Hi,
i have an Issue concering NUnit-Tests decorated with the TestCaseSource-Attribute.
NCrunch only shows me 1 test but in fact there are more because my TestCaseSource returns multiple Testcases.
The Resharper-testrunner shows me all testcases returned by the source.
This makes debugging a specific testcase very difficult because the whole test failes.
Any solutions to this would be very much appreciated.
Thanks in advance
Lars
party solved the issue:
changed from
public void GetAlarms_WithAlarmDataSetsProvided_ReturnsCollectionOfAlarmsWithCorrectTimeSpan(List<GetAlarmDataList> alarmDataSets, List<Alarm> expectedAlarms)
to
public void GetAlarms_WithAlarmDataSetsProvided_ReturnsCollectionOfAlarmsWithCorrectTimeSpan(string testCase, List<GetAlarmDataList> alarmDataSets, List<Alarm> expectedAlarms)
and altered the TestCaseSource to insert the TestCase as string as parameter of the TestCaseData
private static TestCaseData MakeSingleAlarmWithNoDurationTestCase()
{
var legacyAlarmsDataSets = new List<GetAlarmDataList>
{
new GetAlarmDataList { AlarmTime = 3.January(2015).At(12, 30), BatteryLow = true }
};
var expectedAlarms = new List<Alarm>
{
new Alarm { AlarmTime = 3.January(2015).At(12, 30), AlarmTimeSpan = new TimeSpan(0), Key = "BatteryLow" }
};
return new TestCaseData("SingleAlarmWithNoDuration", legacyAlarmsDataSets, expectedAlarms);
}
Now all TestCases are visible as seperate Tests