コード例 #1
0
        public void ConvertedTestCaseIsCached()
        {
            testConverter.ConvertTestCase(fakeNUnitTest);
            var testCase = testConverter.GetCachedTestCase(fakeNUnitTest.TestName.UniqueName);

            CheckTestCase(testCase);
        }
コード例 #2
0
        public void ConvertedTestCaseIsCached()
        {
            testConverter.ConvertTestCase(fakeTestNode);
            var testCase = testConverter.GetCachedTestCase("123");

            CheckTestCase(testCase);
        }
コード例 #3
0
        public void SetUp()
        {
            testLog       = new FakeFrameworkHandle();
            testConverter = new TestConverter(new TestLogger(new MessageLoggerStub(), 0), FakeTestData.AssemblyPath);
            fakeTestNode  = FakeTestData.GetTestNode();

            // Ensure that the converted testcase is cached
            testConverter.ConvertTestCase(fakeTestNode);
            Assert.NotNull(testConverter.GetCachedTestCase("123"));

            listener = new NUnitEventListener(testLog, testConverter);
        }
コード例 #4
0
        public void SetUp()
        {
            testLog = new FakeFrameworkHandle();
            testConverter = new TestConverter(new TestLogger(new MessageLoggerStub(), 0), FakeTestData.AssemblyPath);
            fakeTestNode = FakeTestData.GetTestNode();

            // Ensure that the converted testcase is cached
            testConverter.ConvertTestCase(fakeTestNode);
            Assert.NotNull(testConverter.GetCachedTestCase("123"));
            
            listener = new NUnitEventListener(testLog, testConverter);
        }
コード例 #5
0
        public void SetUp()
        {
            testLog = new FakeFrameworkHandle();

            using (var testConverter = new TestConverter(new TestLogger(new MessageLoggerStub()), FakeTestData.AssemblyPath, collectSourceInformation: true))
            {
                fakeTestNode = FakeTestData.GetTestNode();

                // Ensure that the converted testcase is cached
                testConverter.ConvertTestCase(fakeTestNode);
                Assert.NotNull(testConverter.GetCachedTestCase("123"));

                listener = new NUnitEventListener(testLog, testConverter, null);
            }
        }
コード例 #6
0
        public void SetUp()
        {
            MethodInfo fakeTestMethod = GetType().GetMethod("FakeTestMethod", BindingFlags.Instance | BindingFlags.NonPublic);
            fakeNUnitTest = new NUnitTestMethod(fakeTestMethod);

            fakeNUnitResult = new NUnitTestResult(fakeNUnitTest);
            fakeNUnitResult.SetResult(ResultState.Success, "It passed!", null);
            fakeNUnitResult.Time = 1.234;

            testLog = new FakeFrameworkHandle();

            testConverter = new TestConverter(new TestLogger(), ThisAssemblyPath);

            testConverter.ConvertTestCase(fakeNUnitTest);
            Assert.NotNull(testConverter.GetCachedTestCase(fakeNUnitTest.TestName.UniqueName));

            listener = new NUnitEventListener(testLog, testConverter);
        }
コード例 #7
0
        public void SetUp()
        {
            testLog  = new FakeFrameworkHandle();
            settings = Substitute.For <IAdapterSettings>();
            executor = Substitute.For <INUnit3TestExecutor>();
            executor.Settings.Returns(settings);
            settings.CollectSourceInformation.Returns(true);
            using (var testConverter = new TestConverter(new TestLogger(new MessageLoggerStub()), FakeTestData.AssemblyPath, settings))
            {
                fakeTestNode = new NUnitTestCase(FakeTestData.GetTestNode());

                // Ensure that the converted testcase is cached
                testConverter.ConvertTestCase(fakeTestNode);
                Assert.NotNull(testConverter.GetCachedTestCase("123"));

                listener = new NUnitEventListener(testLog, testConverter, executor);
            }
        }
コード例 #8
0
        public void SetUp()
        {
            MethodInfo fakeTestMethod = GetType().GetMethod("FakeTestMethod", BindingFlags.Instance | BindingFlags.NonPublic);

            fakeNUnitTest = new NUnitTestMethod(fakeTestMethod);

            fakeNUnitResult = new NUnitTestResult(fakeNUnitTest);
            fakeNUnitResult.SetResult(ResultState.Success, "It passed!", null);
            fakeNUnitResult.Time = 1.234;

            testLog = new FakeFrameworkHandle();

            testConverter = new TestConverter(new TestLogger(), ThisAssemblyPath);

            testConverter.ConvertTestCase(fakeNUnitTest);
            Assert.NotNull(testConverter.GetCachedTestCase(fakeNUnitTest.TestName.UniqueName));

            listener = new NUnitEventListener(testLog, testConverter);
        }