hprange / wounit

The WOUnit framework contains a set of utilities for testing WebObjects applications using JUnit 4.7 or later capabilities.
http://hprange.github.io/wounit/
Apache License 2.0
19 stars 18 forks source link

@Dummy annotation to create saved objects easily #7

Closed hprange closed 13 years ago

hprange commented 13 years ago

Instead of:

MyEntity savedEntity = mockEditingContext.createSavedObject(MyEntity.class);

we could declare a field annotated with @Dummy:

@Dummy private MyEntity savedEntity;

and the MockEditingContext rule creates the saved object automagically.