Package net.groboclown.retval.monitor
Class MockProblemMonitor
- java.lang.Object
-
- net.groboclown.retval.monitor.MockObservedMonitor<ProblemContainer>
-
- net.groboclown.retval.monitor.MockProblemMonitor
-
- All Implemented Interfaces:
ObservedMonitor<ProblemContainer>
public class MockProblemMonitor extends MockObservedMonitor<ProblemContainer>
A mock check monitor, suitable for testing. Note that if used in a non-test environment, this has the potential to quickly consume lots of memory. If you want a custom monitored Return Value Type factory, you will need to set that after running thesetup()call; this class'stearDown()call will restore it back to the state when thesetup()was first called.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.groboclown.retval.monitor.MockObservedMonitor
MockObservedMonitor.Registered<T>
-
Nested classes/interfaces inherited from interface net.groboclown.retval.monitor.ObservedMonitor
ObservedMonitor.Listener
-
-
Field Summary
-
Fields inherited from class net.groboclown.retval.monitor.MockObservedMonitor
traceEnabled
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MockProblemMonitorsetup()Create a new mock monitor, and register it.voidtearDown()De-register this monitor.-
Methods inherited from class net.groboclown.retval.monitor.MockObservedMonitor
findRegistered, getNeverObserved, getPrevious, getPreviousReturnTypeFactory, isTraceEnabled, registerInstance
-
-
-
-
Method Detail
-
setup
public static MockProblemMonitor setup()
Create a new mock monitor, and register it.- Returns:
- the new mock instance.
-
tearDown
public void tearDown()
De-register this monitor.- Specified by:
tearDownin classMockObservedMonitor<ProblemContainer>
-
-