xunit - MemberAutoDataAttribute only auto generates values every second execution -


i tried combine member-data , auto data attribute way:

using xunit; using ploeh.autofixture.xunit2;  class memberautodataattribute : compositedataattribute {     public memberautodataattribute(string membername)         : base(             new memberdataattribute(membername),             new autodataattribute())     {     } } 

this test implements it:

[theory, memberautodata(nameof(currentweatherresponses))] public void parsecurrentweather_weatherparsed(     string response,     weather expectedweather,     temperatureunit tempunit) {     // ... } 

and here currentweatherresponses member:

public static ienumerable<object[]> currentweatherresponses {         {         yield return             new object[]             {                 currentweatherresponse.tostring(),                 new weather() {}             };     } } 

why every second test execution values generated , not temperature unit?


Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -