FlexTradeUKLtd / jfixture

JFixture is an open source library based on the popular .NET library, AutoFixture
MIT License
105 stars 22 forks source link

FixtureCollections is missing a create methods for generic types #35

Open TWiStErRob opened 7 years ago

TWiStErRob commented 7 years ago

Essentially all methods on that class whose parameter names are innerType, keyType, valueType should have an overload that accepts Type. For example: right now it's not possible to create a List<Map<String, Integer>> through fixture.collections().createCollection(List.class, Map.class), because the innerType is not enough to know if it needs to create the strings and ints inside. As a workaround we can use fixture.create(new SpecimenType<List<Map<String, Integer>>>(){}), but notice for example that in this case we can't specify the size of the collection.