Module de.cuioss.test.generator
Package de.cuioss.test.generator.junit
Class GeneratorControllerExtension
java.lang.Object
de.cuioss.test.generator.junit.GeneratorControllerExtension
- All Implemented Interfaces:
org.junit.jupiter.api.extension.BeforeEachCallback,org.junit.jupiter.api.extension.Extension,org.junit.jupiter.api.extension.TestExecutionExceptionHandler
public class GeneratorControllerExtension
extends Object
implements org.junit.jupiter.api.extension.BeforeEachCallback, org.junit.jupiter.api.extension.TestExecutionExceptionHandler
If enabled, either by using
ExtendWith or
EnableGeneratorController this Extension controls the seed
initialization, by checking for GeneratorSeed and intercepts
Test-failures by printing information providing the seed to reproduce.- Author:
- Oliver Wolff
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbeforeEach(org.junit.jupiter.api.extension.ExtensionContext context) voidhandleTestExecutionException(org.junit.jupiter.api.extension.ExtensionContext context, Throwable throwable)
-
Constructor Details
-
GeneratorControllerExtension
public GeneratorControllerExtension()
-
-
Method Details
-
handleTestExecutionException
public void handleTestExecutionException(org.junit.jupiter.api.extension.ExtensionContext context, Throwable throwable) throws Throwable - Specified by:
handleTestExecutionExceptionin interfaceorg.junit.jupiter.api.extension.TestExecutionExceptionHandler- Throws:
Throwable
-
beforeEach
- Specified by:
beforeEachin interfaceorg.junit.jupiter.api.extension.BeforeEachCallback- Throws:
Exception
-