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
Post a Comment