six2six / fixture-factory

Generator fake objects from a template
Apache License 2.0
445 stars 88 forks source link

AssociationFunction "has(n).of" accepts only List interface #18

Closed douglasrodrigo closed 11 years ago

douglasrodrigo commented 11 years ago

Add possibility to work with Collection and Sets.

nykolaslima commented 11 years ago

gimme method on ObjectFactory class returns a List. I tried to change it to returns a collection but then when call gimme method I will need an explicit cast.

What about create a sintax like that?

gimme(2, "valid").asList()
gimme(2, "valid").asSet()
aparra commented 11 years ago

That has to be transparent to the user. The fixture has to do it. We will work with the attribute type for "explicit" cast, same way bfmapper.

nykolaslima commented 11 years ago

Can you show an example of this in bfmapper?

nykolaslima commented 11 years ago

Fixed with pull request #25