autofixture - Class with a nested collection - how do I populate the nested class? -


I am confusing a class as a hydrates with another class nested collection. I get an error:

was unable to make an example from the autofiteration system. Colllections.Generic.ilist`1 [typename ...]

I to register the type for the population of the intermediate class. Have tried using registration () .

  • Nested collection of another category (ILIIT / INInMerable) What can I do with a sample
    1. Main category
    2. I also noticed that register () has been marked as obsolete, yet on CodePlex on injection () method There is no document, so I have been stumped how it should work.

      Creates no guess as the instantification of the Autofiteration interface, but for you - like an integer :

        fixture.Register ((=) gt; fixture.CreateMany & lt; int & gt; ());   

      In the upcoming AutoFire 2.1 you can also do a method call with:

        var fixture = new fixture (). Optimize (new multiple customization ()); In relation to the boycott of the register method, please note that this is only a single surcharge of the registered method which has been marked obsolete. The injection method is a direct replacement - it has the same signature and usage, just a different name. All other overloads have not been deprecated and they should be used as 'documents'.   

  • Comments