public class DurationObserver extends Object implements Observer
Observer implementation to observe the method under test and the time it took to run as well as the expected time, if any
This class is instantiated during the initialization phase of the EasyTest's runner.
It has a synchronized list in which data is added for each run of the test method.
Thus in case of parallel execution of tests multiple threads can try to add the data at the same time, thus the synchronized list.
A user of this list should take care of synchronizing the iteration process on this list if multiple threads are involved.| Constructor and Description |
|---|
DurationObserver() |
| Modifier and Type | Method and Description |
|---|---|
List<MethodUnderTestDuration> |
getDurationList()
Return the List of
MethodUnderTestDuration |
void |
update(Observable o,
Object obj)
Method responsible for updating the duration list and adding an instance of
MethodUnderTestDuration
for each execution of the test. |
public void update(Observable o, Object obj)
MethodUnderTestDuration
for each execution of the test.update in interface Observero - the observable instanceobj - an instance of MethodUnderTestDurationpublic List<MethodUnderTestDuration> getDurationList()
MethodUnderTestDurationCopyright © 2014. All rights reserved.