six2six / fixture-factory

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

Bugfix: choosing the right constructor when a default one is not available. #32

Closed marcelocenerine closed 11 years ago

marcelocenerine commented 11 years ago

When instantiating a new object (fixture), the class "ObjectFactory" tries to find a constructor containing the largest number of arguments that match to the attribute names in that class. If multiple constructors containing arguments with identical names (but not the same types) are available, the wrong one could be choosen because the current version of this framework doesn't validate the argument types.