Пример #1
0
        public void RecordResultShouldUpdateTestRunCache()
        {
            var testCase     = new TestCase("A.C.M", new Uri("executor://dummy"), "A");
            var testResult   = new Microsoft.VisualStudio.TestPlatform.ObjectModel.TestResult(testCase);
            var testRecorder = new TestExecutionRecorder(null, this.testableTestRunCache);

            testRecorder.RecordResult(testResult);
            Assert.IsTrue(this.testableTestRunCache.TestResultList.Contains(testResult));
        }
Пример #2
0
        public void RecordResultShouldSendTestCaseEvents()
        {
            var testCase   = new TestCase("A.C.M", new Uri("executor://dummy"), "A");
            var testResult = new Microsoft.VisualStudio.TestPlatform.ObjectModel.TestResult(testCase);
            var mockTestCaseEventsHandler = new Mock <ITestCaseEventsHandler>();
            var testRecorder = new TestExecutionRecorder(mockTestCaseEventsHandler.Object, this.testableTestRunCache);

            testRecorder.RecordResult(testResult);

            mockTestCaseEventsHandler.Verify(tceh => tceh.SendTestResult(testResult), Times.Once);
        }