public enum TestContainer extends java.lang.Enum<TestContainer>
| Enum Constant and Description | 
|---|
INSTANCE
The singleton. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
after(HookFunction function)
Registers a 'after' block to be run. 
 | 
void | 
after(java.lang.String description,
     HookFunction function)
Registers a 'after' block to be run. 
 | 
void | 
afterEach(HookFunction function)
Registers a 'afterEach' block to be run. 
 | 
void | 
afterEach(java.lang.String description,
         HookFunction function)
Registers a 'afterEach' block to be run. 
 | 
void | 
before(HookFunction function)
Registers a 'before' block to be run. 
 | 
void | 
before(java.lang.String description,
      HookFunction function)
Registers a 'before' block to be run. 
 | 
void | 
beforeEach(HookFunction function)
Registers a 'beforeEach' block to be run. 
 | 
void | 
beforeEach(java.lang.String description,
          HookFunction function)
Registers a 'beforeEach' block to be run. 
 | 
TestBlock | 
defineTests(java.lang.Class<?> testClass,
           java.lang.Runnable testDefiner)
Define tests within the context of a test class. 
 | 
void | 
describe(java.lang.String description,
        TestBlockFunction function)
Registers a described suite of tests to be run. 
 | 
void | 
it(Behaviour behaviour,
  java.lang.String description,
  java.util.Optional<TestFunction> function,
  Options options)
Registers a test function to be run. 
 | 
void | 
it(java.lang.String description)
Registers a pending test. 
 | 
void | 
it(java.lang.String description,
  TestFunction function)
Registers a test function to be run. 
 | 
TestBuilder | 
only()
Mark a test or block of tests as the only tests that should be run. 
 | 
void | 
runTests(java.lang.Runnable testRunner)
For internal use only. 
 | 
TestBuilder | 
skip()
Mark a test or block of tests to be skipped. 
 | 
Option | 
tags(java.lang.String... tags)
Decorates tests with a set of tags. 
 | 
static TestContainer | 
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. 
 | 
static TestContainer[] | 
values()
Returns an array containing the constants of this enum type, in
the order they are declared. 
 | 
void | 
when(java.lang.String description,
    TestBlockFunction function)
Registers a 'when' block to be run. 
 | 
TestBuilder | 
with(Option... options)
Decorate a test or block of tests with additional options. 
 | 
public static final TestContainer INSTANCE
public static TestContainer[] values()
for (TestContainer c : TestContainer.values()) System.out.println(c);
public static TestContainer valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic void describe(java.lang.String description,
                     TestBlockFunction function)
description - The description of the 'describe' block.function - The 'describe' block.public void when(java.lang.String description,
                 TestBlockFunction function)
description - The description of the 'when' block.function - The 'when' block.public void before(HookFunction function)
function - The 'before' block.public void before(java.lang.String description,
                   HookFunction function)
description - The description of the 'before' block.function - The 'before' block.public void after(HookFunction function)
function - The 'after' block.public void after(java.lang.String description,
                  HookFunction function)
description - The description of the 'after' block.function - The 'after' block.public void beforeEach(HookFunction function)
function - The 'beforeEach' block.public void beforeEach(java.lang.String description,
                       HookFunction function)
description - The description of the 'beforeEach' block.function - The 'beforeEach' block.public void afterEach(HookFunction function)
function - The 'afterEach' block.public void afterEach(java.lang.String description,
                      HookFunction function)
description - The description of the 'afterEach' block.function - The 'afterEach' block.public void it(java.lang.String description,
               TestFunction function)
description - The description of the test function.function - The test function.public void it(java.lang.String description)
A pending test has no implementation and acts as a reminder to the developer to write the implementation later.
description - The description of the test.public void it(Behaviour behaviour, java.lang.String description, java.util.Optional<TestFunction> function, Options options)
behaviour - If Behaviour.SKIP then this test will be skipped.description - The description of the test function.function - The test function.options - The set of options applied to the test.public TestBuilder with(Option... options)
options - Options to apply to the test/block.public TestBuilder skip()
public TestBuilder only()
public Option tags(java.lang.String... tags)
tags - String identifiers that can be used when running Cuppa to include or exclude a test/block.public void runTests(java.lang.Runnable testRunner)
testRunner - A function that will run tests.public TestBlock defineTests(java.lang.Class<?> testClass, java.lang.Runnable testDefiner)
Cuppa methods
 should be wrapped in this method.testClass - The class that the tests are defined in.testDefiner - A function that will define tests, usually by instantiating the given test class.