FlexTradeUKLtd / jfixture

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

Add support for inheritance with generic types - fixes issue #36 #37

Closed cliffsun91 closed 7 years ago

cliffsun91 commented 7 years ago

*Note there are more complex scenarios that aren't covered by this fix - for example if multiple generic types in an inheritance hierarchy use the same Type variable then it this won't work.

There are some comments in the code which explain the reason for certain things - I can get rid of these but for now they might give reviewers a bit more context.

I feel like this is a bit of a naive solution and only really covers a few basic cases (the ones in the unit test essentially), in order to properly cover generic type inheritance we might need to think about how and when SpecimenType should be used.

All tests are passing.