public final class TestBlockBuilder
extends java.lang.Object
TestBlock
instances.Constructor and Description |
---|
TestBlockBuilder() |
Modifier and Type | Method and Description |
---|---|
TestBlock |
build()
Constructs a
TestBlock using the values set on this builder. |
TestBlockBuilder |
setBehaviour(Behaviour behaviour)
Sets the behaviour of the test block.
|
TestBlockBuilder |
setDescription(java.lang.String description)
Sets the description of the test block.
|
TestBlockBuilder |
setHooks(java.util.List<Hook> hooks)
Sets the hooks defined by the test block.
|
TestBlockBuilder |
setOptions(Options options)
Sets the options applied to the test block.
|
TestBlockBuilder |
setTestBlocks(java.util.List<TestBlock> testBlocks)
Sets the nested test blocks.
|
TestBlockBuilder |
setTestClass(java.lang.Class<?> testClass)
Sets the class that the test block was defined in.
|
TestBlockBuilder |
setTests(java.util.List<Test> tests)
Sets the tests defined by the test block.
|
TestBlockBuilder |
setType(TestBlockType type)
Set the type of the test block.
|
public TestBlockBuilder setType(TestBlockType type)
type
- The type.TestBlockBuilder
.public TestBlockBuilder setBehaviour(Behaviour behaviour)
The behaviour controls how the test block and its descendants behave.
behaviour
- The behaviour.TestBlockBuilder
.public TestBlockBuilder setTestClass(java.lang.Class<?> testClass)
testClass
- The test class.TestBlockBuilder
.public TestBlockBuilder setDescription(java.lang.String description)
description
- The description.TestBlockBuilder
.public TestBlockBuilder setTestBlocks(java.util.List<TestBlock> testBlocks)
The list will be copied when build()
is called.
testBlocks
- A list of test blocks.TestBlockBuilder
.public TestBlockBuilder setHooks(java.util.List<Hook> hooks)
The list will be copied when build()
is called.
hooks
- A list of hooks.TestBlockBuilder
.public TestBlockBuilder setTests(java.util.List<Test> tests)
The list will be copied when build()
is called.
tests
- A list of tests.TestBlockBuilder
.public TestBlockBuilder setOptions(Options options)
options
- The options.TestBlockBuilder
.