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

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

jsf - "PropertyNotWritableException: Illegal Syntax for Set Operation" error when setting value in bean -

laravel - Undefined property: Illuminate\Pagination\LengthAwarePaginator::$id (View: F:\project\resources\views\admin\carousels\index.blade.php) -