-
- All Implemented Interfaces:
-
com.kaspersky.kaspresso.testcases.core.sections.InitSection,com.kaspersky.kaspresso.testcases.core.sections.TransformSection
public final class MainTestSection<InitData extends Object, Data extends Object> implements InitSection<InitData, Data>, TransformSection<Data>
The representation of an actual test.
-
-
Method Summary
Modifier and Type Method Description Unitrun(Function1<TestContext<Data>, Unit> steps)Runs: Optional BeforeTestSection,
Optional init,
Optional transform's sections (only if init was called before),
MainTestSection's steps,
AfterTestSection. AfterTestSection is invoked even if BeforeTestSection or BaseTestCase's steps failed.
TransformSection<Data>init(Function1<InitData, Unit> actions)Can be invoked after BeforeTestSection. TransformSection<Data>transform(Function1<Data, Unit> actions)Can be invoked after BeforeTestSection and init but before MainTestSection. -
-
Method Detail
-
run
Unit run(Function1<TestContext<Data>, Unit> steps)
Runs:
Optional BeforeTestSection,
Optional init,
Optional transform's sections (only if init was called before),
MainTestSection's steps,
AfterTestSection. AfterTestSection is invoked even if BeforeTestSection or BaseTestCase's steps failed.
- Parameters:
steps- steps to run.
-
init
TransformSection<Data> init(Function1<InitData, Unit> actions)
Can be invoked after BeforeTestSection. Running to init test data using dsl.
- Parameters:
actions- actions to be wrapped and invoked before the test.
-
transform
TransformSection<Data> transform(Function1<Data, Unit> actions)
Can be invoked after BeforeTestSection and init but before MainTestSection.
It's possible to add multiple transform blocks.
- Parameters:
actions- actions to run.
-
-
-