public void ConvertedTestCaseIsCached() { testConverter.ConvertTestCase(fakeNUnitTest); var testCase = testConverter.GetCachedTestCase(fakeNUnitTest.TestName.UniqueName); CheckTestCase(testCase); }
public void ConvertedTestCaseIsCached() { testConverter.ConvertTestCase(fakeTestNode); var testCase = testConverter.GetCachedTestCase("123"); CheckTestCase(testCase); }
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); }
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); } }
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); }
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); } }