Closed hprange closed 13 years ago
When testing an EO, usually a basic setup have to be made in order to test an EO:
private EO eo;
@Before pubic void setup() { eo = EO.createEO(ec); }
The @UnderTest annotation could be used to reduce the amount of boilerplate code.
@UnderTest private EO eo;
The MockEditingContext and the TemporaryEditingContext rules creates and inserts the EO automagically.
The annotation is also useful as a sanity check. Unit tests usually will have only one field annotated with @UnderTest.
When testing an EO, usually a basic setup have to be made in order to test an EO:
private EO eo;
@Before pubic void setup() { eo = EO.createEO(ec); }
The @UnderTest annotation could be used to reduce the amount of boilerplate code.
@UnderTest private EO eo;
The MockEditingContext and the TemporaryEditingContext rules creates and inserts the EO automagically.
The annotation is also useful as a sanity check. Unit tests usually will have only one field annotated with @UnderTest.