Class Helpers
- java.lang.Object
-
- cloud.filibuster.junit.assertions.Helpers
-
public class Helpers extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Helpers()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
assertionBlock(java.lang.Runnable block)
Assertion block used by test, to indicate assertion code that calls APIs where fault injection should not be used.static void
executeWithoutFaultInjection(BlockType blockType, java.lang.Runnable block)
Execute the following block without faults.static void
incrementTestScopeCounter(BlockType blockType)
static void
setupBlock(java.lang.Runnable block)
Setup block used by test, to indicate setup code that calls APIs where fault injection should not be used.static void
teardownBlock(java.lang.Runnable block)
Teardown block used by test, to indicate teardown code that calls APIs where fault injection should not be used.static void
testBlock(java.lang.Runnable block)
Test block used by test.
-
-
-
Method Detail
-
setupBlock
public static void setupBlock(java.lang.Runnable block)
Setup block used by test, to indicate setup code that calls APIs where fault injection should not be used.- Parameters:
block
- code to execute.
-
testBlock
public static void testBlock(java.lang.Runnable block)
Test block used by test.- Parameters:
block
- code to execute.
-
assertionBlock
public static void assertionBlock(java.lang.Runnable block)
Assertion block used by test, to indicate assertion code that calls APIs where fault injection should not be used.- Parameters:
block
- code to execute.
-
teardownBlock
public static void teardownBlock(java.lang.Runnable block)
Teardown block used by test, to indicate teardown code that calls APIs where fault injection should not be used.- Parameters:
block
- code to execute.
-
incrementTestScopeCounter
public static void incrementTestScopeCounter(BlockType blockType)
-
executeWithoutFaultInjection
public static void executeWithoutFaultInjection(BlockType blockType, java.lang.Runnable block)
Execute the following block without faults.Assumes that the block is executed synchronously -- use of this inside of concurrency primitives without explicit synchronization may render this function unable to prevent faults from being injected.
- Parameters:
blockType
-BlockType
used only for displayblock
- block to execute synchronously.
-
-