Example:
[Test, TestCaseDataSource("MyDataSource")]
public TestClass TestMyMethod(TestCaseData testData)
{
---Do some stuff---
return TestClass;
}
public IEnumerable<TestCaseData> MyDataSource()
{
yield return new TestCaseData("test").Returns(new TestClass(){--some params--}.SetName("MyTestCaseScenario"));
}
Aucun commentaire:
Enregistrer un commentaire