org.cddcore.engine.EngineUniverse

ScenarioBuilder

trait ScenarioBuilder extends AnyRef

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ScenarioBuilder
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def builderData: ScenarioBuilderData

  2. abstract def copy(builderData: ScenarioBuilderData): RealScenarioBuilder

    You should probably not call this explicitly.

    You should probably not call this explicitly. This makes a copy of the builder with new data. The builder is an immutable object, so this is how data is actually 'changed' when you call methods like description

  3. abstract def thisAsBuilder: RealScenarioBuilder

    Attributes
    protected

Concrete Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def assertion(a: CodeHolder[EngineUniverse.A], comment: String = ""): RealScenarioBuilder

    An assertion is an extra test to be run.

    An assertion is an extra test to be run. The assertions must be true for the scenario when the engine has been built. The function you pass in to it takes the parameters and the result of the engine, and returns a boolean

  8. def because(b: CodeHolder[EngineUniverse.B], comment: String = ""): RealScenarioBuilder

    Set the 'because' of the 'last thing to be mentioned' to be this value.

    Set the 'because' of the 'last thing to be mentioned' to be this value. i.e. the builder/usecase/scenario. Throws CannotDefineBecauseTwiceException if expected already set. If you haven't set a code, then this will also act as the code

  9. def buildTarget: AnyRef

  10. def childEngine(engineTitle: String, description: String = null): RealScenarioBuilder

  11. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  12. def code(c: EngineUniverse.Code, comment: String = ""): RealScenarioBuilder

    This is optional, as it defaults to returning 'expected'.

    This is optional, as it defaults to returning 'expected'. The code is the code that you would use to generate the expected.

    The TennisScorer is a good example of where this is needed :

         scenario(2, 3).expected("thirty, forty").code((l: Int, r: Int) => s"${lookup(l)}, ${lookup(r)}").
    

    Although in this case 'thirty forty' is the expected, we want to calculate the value so that it can be generalised for other inputs

  13. def configuration[K](cfg: EngineUniverse.CfgFn): RealScenarioBuilder

    This method is used if you are action on mutable parameters.

    This method is used if you are action on mutable parameters. The cgnFn is called to setup the parameters prior to them being used in the because clause

    The cfgFn is only used while building the engine. An example use would be when the parameter is a mutable object like a Swing JTextArea. The cfgFn would setup the textarea to have the correct values

  14. def copy(depth: Int = builderData.depth, title: Option[String] = builderData.title, description: Option[String] = builderData.description, children: ReportableList = builderData.children, foldFn: Option[(FullR, R) ⇒ FullR] = builderData.folder, initialFoldValue: () ⇒ FullR = builderData.initialFoldValue, optCode: Option[EngineUniverse.Code] = builderData.optCode, expected: Option[ROrException[R]] = builderData.expected, priority: Option[Int] = builderData.priority, references: Set[Reference] = builderData.references, documents: List[Document] = builderData.documents, paramDetails: List[ParamDetail] = builderData.paramDetails): RealScenarioBuilder

    Attributes
    protected
  15. def description(description: String): RealScenarioBuilder

    Set the description of the 'last thing to be mentioned' i.

    Set the description of the 'last thing to be mentioned' i.e. the builder/usecase/scenario. Throws CannotDefineDescriptionTwiceException if title already set. The description is used when creating reports

  16. def document(documents: Document*): RealScenarioBuilder

    This adds the documents you specify to the documents that the builder 'knows about'.

    This adds the documents you specify to the documents that the builder 'knows about'. Currently the documents are only used by references.

  17. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  18. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  19. def expectException[E <: Throwable](e: E, comment: String = ""): RealScenarioBuilder

    Set the 'expected' of the 'last thing to be mentioned' to be an exception.

    Set the 'expected' of the 'last thing to be mentioned' to be an exception. i.e. the builder/usecase/scenario. Throws CannotDefineExpectedTwiceException if expected already set. Note that the engine will currently only check the type of the message, not the message itself, and that you must have a 'code' to throw the exception

  20. def expected(e: R): RealScenarioBuilder

    Set the 'expected' of the 'last thing to be mentioned' to be this value.

    Set the 'expected' of the 'last thing to be mentioned' to be this value. i.e. the builder/usecase/scenario. Throws CannotDefineExpectedTwiceException if expected already set. If you haven't set a code, then this will also act as the code

  21. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  22. def findDocument(documentName: String): Document

    Attributes
    protected
  23. def getBuildTarget(depth: Int, node: AnyRef): AnyRef

    Attributes
    protected
  24. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  25. def getParent: Option[AnyRef]

    Attributes
    protected
  26. def getParentAt(depth: Int, parent: AnyRef): AnyRef

    Attributes
    protected
  27. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  28. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  29. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  30. def newScenario(scenarioTitle: String, scenarioDescription: String, params: List[Any]): RealScenarioBuilder

    Attributes
    protected
  31. final def notify(): Unit

    Definition Classes
    AnyRef
  32. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  33. def param(parser: Function1[String, _], name: String = ..., testValue: String = null): RealScenarioBuilder

    This is only used when using the 'live' website option.

    This is only used when using the 'live' website option. It turns a string into a parameter, and gives the parameter a 'nice' name on the website

  34. def priority(priority: Int): RealScenarioBuilder

    Set the 'priority' of the 'last thing to be mentioned' to be this value.

    Set the 'priority' of the 'last thing to be mentioned' to be this value. i.e. the builder/usecase/scenario. This determines the 'rule ordering' of the scenarios. If you don't like the produced decision tree, you can increase /decrease the priority of a scenario with the because clause you want to move

  35. def reference(ref: String, document: Option[Document] = None): RealScenarioBuilder

    Adds a reference to the 'last thing to be mentioned'.

    Adds a reference to the 'last thing to be mentioned'. This is just the 'ref' string, without a document

  36. def reference(ref: String, document: Document): RealScenarioBuilder

    Adds a reference to the 'last thing to be mentioned'.

    Adds a reference to the 'last thing to be mentioned'. References are currently just used in the reports.

  37. def reference(ref: String, documentName: String): RealScenarioBuilder

    Adds a reference to the 'last thing to be mentioned'.

    Adds a reference to the 'last thing to be mentioned'. References are currently just used in the reports. If the documentName isn't in the list of doucments, this will throw a CannotFindDocumentException

  38. def set[X](x: X, bFn: (ScenarioBuilder, X) ⇒ ScenarioBuilder, ceFn: (ChildEngineDescription, X) ⇒ ChildEngineDescription, uFn: (UseCaseDescription, X) ⇒ UseCaseDescription, sFn: (Scenario, X) ⇒ Scenario, checkFn: (BuilderNode, X) ⇒ Unit = (b: BuilderNode, x: X) => {}): RealScenarioBuilder

    Attributes
    protected
  39. def setWithDepth[Node, X](depth: Int, node: Node, x: X, bFn: (ScenarioBuilder, X) ⇒ ScenarioBuilder, ceFn: (ChildEngineDescription, X) ⇒ ChildEngineDescription, uFn: (UseCaseDescription, X) ⇒ UseCaseDescription, sFn: (Scenario, X) ⇒ Scenario, checkFn: (BuilderNode, X) ⇒ Unit = (b: BuilderNode, x: X) => {}): Node

    Attributes
    protected
  40. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  41. def title(title: String): RealScenarioBuilder

    Set the title of the 'last thing to be mentioned' i.

    Set the title of the 'last thing to be mentioned' i.e. the builder/usecase/scenario. Throws CannotDefineTitleTwiceException if title already set. The title is used when creating reports

  42. def toString(): String

    Definition Classes
    AnyRef → Any
  43. def useCase(useCaseTitle: String, useCaseDescription: String): RealScenarioBuilder

    Starts the definition of a new case.

    Starts the definition of a new case. A use case can be thought of as a list of scenarios

  44. def useCase(useCaseTitle: String): RealScenarioBuilder

    Starts the definition of a new case.

    Starts the definition of a new case. A use case can be thought of as a list of scenarios

  45. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  46. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  47. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  48. def withUseCase(useCaseTitle: String, useCaseDescription: Option[String]): RealScenarioBuilder

    Attributes
    protected

Inherited from AnyRef

Inherited from Any

Ungrouped