hprange/wounit — Issue #21: Create collection of dummy objects
Author: hprange
Created: 2011-10-12 00:59:39+00:00
State: open
Labels: feature

Some tests require more than one object of a type to verify the expected condition.

private NSArray foos;

@Before
public void setup() {
foos = new NSMutableArray();

foos.add(ec.createSavedObject(Foo.class));
foos.add(ec.createSavedObject(Foo.class));
}

We could enhance the @Dummy annotation to support this kind of feature out of the box.

@Dummy(size=2)
private NSArray foos;

We can support NSArray, NSSet among other kinds of Collection.

The default value for the size parameter should be one.