コード例 #1
0
        public void Constructor_Default_Always_SetsTestResultsByTestCaseIdToEmpty()
        {
            var uut = new TestCasesEventArgs();

            var result = uut.TestCasesById;

            CollectionAssert.IsEmpty(result);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
            }
        }