public void Constructor_Default_Always_SetsTestResultsByTestCaseIdToEmpty() { var uut = new TestCasesEventArgs(); var result = uut.TestCasesById; CollectionAssert.IsEmpty(result); }
public void Constructor_TestCases_Otherwise_TestCasesByIdValuesIsEquivalentToTestCases(int testCaseCount) { var testResults = Enumerable.Range(1, testCaseCount) .Select(x => MakeFakeTestCase()) .ToArray(); var uut = new TestCasesEventArgs(testResults); var result = uut.TestCasesById.Values; CollectionAssert.AreEquivalent(testResults, result); }
public void Constructor_TestCases_Otherwise_TestCasesByIdEachKeyIsEqualToValueId(int testCaseCount) { var testResults = Enumerable.Range(1, testCaseCount) .Select(x => MakeFakeTestCase()) .ToArray(); var uut = new TestCasesEventArgs(testResults); var result = uut.TestCasesById; foreach (var testCasePair in result) { Assert.AreEqual(testCasePair.Key, testCasePair.Value.Id); } }