public NJasmineTestMethod CreateTest(GlobalSetupManager globalSetupManager, NJasmineTestSuite parentTest, TestPosition position, string description) { var test = new NJasmineTestMethod(_fixtureFactory, position, globalSetupManager); NameGenator.NameTest(description, parentTest, test); return test; }
public INativeTest ForTest(FixtureContext fixtureContext, TestContext testContext) { var nunitTest = new NJasmineTestMethod(testContext); ApplyNameToNUnitTest(testContext.Name, nunitTest); return new NativeTest(nunitTest, testContext.Name); }
public INativeTest ForTest(FixtureContext fixtureContext, TestContext testContext) { var nunitTest = new NJasmineTestMethod(testContext); ApplyNameToNUnitTest(testContext.Name, nunitTest); return(new NativeTest(nunitTest, testContext.Name)); }
public void can_be_ran() { AFixture fixture = new AFixture(); var sut = new NJasmineTestMethod(() => fixture, new TestPosition(1, 3, 2), new FakeGlobalSetupManager()); List<string> ignored; sut.RunTestMethodInner(new TestResultShim(), out ignored); expect_observation_matches(fixture.Observations, 1, 2, 3, 4, 5, 6, 7, -2, -3, -4, 8); }
public void duplicated_runs_dont_accidentally_accumulate_afterEach_calls() { AFixture fixture = new AFixture(); var sut = new NJasmineTestMethod(() => fixture, new TestPosition(1, 3, 2), new FakeGlobalSetupManager()); List<string> ignored; sut.RunTestMethodInner(new TestResultShim(), out ignored); fixture.ResetObservations(); sut.RunTestMethodInner(new TestResultShim(), out ignored); expect_observation_matches(fixture.Observations, 1, 2, 3, 4, 5, 6, -2, -3, -4, 7, 8); }
void expect_test_to_observe(TestPosition testPosition, List<string> expected) { var fixture = new has_test_in_loop(); var method = new NJasmineTestMethod(() => fixture, testPosition, new FakeGlobalSetupManager()); TestResultShim result = new TestResultShim(); List<string> ignored; method.RunTestMethodInner(result, out ignored); expect(() => result.IsSuccess); Assert.That(fixture.Observations, Is.EquivalentTo(expected)); }