c# - NUnit TestCaseSource returns the same data for different yields -
i have issue nunit framework , testcasesourse. have test data:
public testdata[] data = new testdatabuilder() .add("inputfile", "132jointest.xml") .addrange("delimiter", ";", "") .addallsubsets("sectionnames", new string[] { "headline", "byline", "summary" }).gettestdata();
also have data testcasesource:
public ienumerable<testcasedata> reducetagsnumber { { yield return new testcasedata(data[0]); yield return new testcasedata(data[1]); } } [testcasesource("reducetagsnumber")] public void execute_forinputthatcouldbejoined_reducetagsnumber(testdata data) { //some code here }
i double check, data[0] , data[1] contains different data. when run nunit tests both of them runned data[0]. try implement in different ways, same result. note: if use testdata structure instead testdata class nunit doesn't see second testcase @ all.
Comments
Post a Comment