Package net.officefloor.test
Class OfficeFloorRule
- java.lang.Object
-
- net.officefloor.test.AbstractOfficeFloorJUnit
-
- net.officefloor.test.OfficeFloorRule
-
- All Implemented Interfaces:
OfficeFloorJUnit
,org.junit.rules.TestRule
public class OfficeFloorRule extends AbstractOfficeFloorJUnit implements org.junit.rules.TestRule
TestRule
for runningOfficeFloor
around tests.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description OfficeFloorRule()
Instantiate for no dependency injection of test.OfficeFloorRule(java.lang.Object testInstance)
Instantiate to dependency inject into the test instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.junit.runners.model.Statement
apply(org.junit.runners.model.Statement base, org.junit.runner.Description description)
protected void
doFail(java.lang.String message)
Undertake JUnit version specific fail.protected java.lang.Error
doFail(java.lang.Throwable cause)
Undertake JUnit version specific fail.-
Methods inherited from class net.officefloor.test.AbstractOfficeFloorJUnit
afterAll, afterEach, beforeAll, beforeEach, closeOfficeFloor, getDependency, getOfficeFloor, initialiseOfficeFloorCompiler, invokeProcess, invokeProcess, invokeProcess, isDependencyAvailable, openOfficeFloor, setDependencyLoadTimeout
-
-
-
-
Method Detail
-
doFail
protected void doFail(java.lang.String message)
Description copied from class:AbstractOfficeFloorJUnit
Undertake JUnit version specific fail.- Specified by:
doFail
in classAbstractOfficeFloorJUnit
- Parameters:
message
- Message for the fail.
-
doFail
protected java.lang.Error doFail(java.lang.Throwable cause)
Description copied from class:AbstractOfficeFloorJUnit
Undertake JUnit version specific fail.- Specified by:
doFail
in classAbstractOfficeFloorJUnit
- Parameters:
cause
- Cause of the failure.- Returns:
Error
to propagate.
-
apply
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description)
- Specified by:
apply
in interfaceorg.junit.rules.TestRule
-
-