Activity log for bug #941727

Date Who What changed Old value New value Message
2012-02-27 02:30:08 thirukumaran bug added bug
2012-07-12 02:39:33 Charlie Poole nunit-3.0: status New Triaged
2012-07-12 02:39:35 Charlie Poole nunit-3.0: importance Undecided Wishlist
2014-02-02 21:37:07 Charlie Poole description I am trying to data drive by test using excel sheet. My requirement is that based on the name of the test i need to pull appropriate data for the test. In the code below inside TestCaseDataList i need to find out what is the name of the test. Usually I use TestContext to get the test method but this runs before the test is even run so can't use that. [TestFixture] class TestSuite { [Test] [TestCaseSource(typeof(MyFactoryClass), "TestCaseDataList")] public void MyTestMethod(string apikey, string userid, string productid) { Console.WriteLine(apikey); Console.WriteLine(userid); Console.WriteLine(productid); } } public class MyFactoryClass { public static IEnumerable<TestCaseData> TestCaseDataList { get { string mydata=""; mydata= GetTestMethodName().Tostring //Something like this i need List<TestCaseData> testCaseDataList = ExcelDataManager.GetExcelData(mydata); foreach (TestCaseData testCaseData in testCaseDataList) { yield return testCaseData; } } } } } Please help as soon as possible. [This bug has been merged with and is now being tracked as https://github.com/nunit/nunit-framework/issues/68] I am trying to data drive by test using excel sheet. My requirement is  that based on the name of the test i need to pull appropriate data for  the test. In the code below inside TestCaseDataList i need to find out what is  the name of the test. Usually I use TestContext to get the test method  but this runs before the test is even run so can't use that. [TestFixture]      class TestSuite      {           [Test]           [TestCaseSource(typeof(MyFactoryClass), "TestCaseDataList")]              public void MyTestMethod(string apikey, string userid,  string productid)              {                  Console.WriteLine(apikey);                  Console.WriteLine(userid); Console.WriteLine(productid);              }      }     public class MyFactoryClass      {          public static IEnumerable<TestCaseData> TestCaseDataList          {              get                  {                      string mydata="";                      mydata= GetTestMethodName().Tostring //Something  like this i need                      List<TestCaseData> testCaseDataList =  ExcelDataManager.GetExcelData(mydata);                     foreach (TestCaseData testCaseData in  testCaseDataList)                      {                          yield return testCaseData;                      }                  }          }      } } Please help as soon as possible.
2014-02-02 21:40:27 Charlie Poole tags testcasesource testcasesourceattribute github