Example #1
0
        public void duplicated_runs_dont_accidentally_accumulate_afterEach_calls()
        {
            AFixture fixture = new AFixture();

            var fakeGlobalSetupManager = new FakeGlobalSetupManager();

            TestPosition testPosition = TestPosition.At(1, 3, 2);

            var traceMessages = new List <string>();

            SpecificationRunner.RunTest(new TestContext()
            {
                FixtureContext = new FixtureContext(null, () => fixture, null, fakeGlobalSetupManager),
                Name           = new TestName(),
                Position       = testPosition
            }, traceMessages);

            fixture.ResetObservations();

            var traceMessages1 = new List <string>();

            SpecificationRunner.RunTest(new TestContext()
            {
                FixtureContext = new FixtureContext(null, () => fixture, null, fakeGlobalSetupManager),
                Name           = new TestName(),
                Position       = testPosition
            }, traceMessages1);

            expect_observation_matches(fixture.Observations, 1, 2, 3, 4, 5, 6, -2, -3, -4, 7, 8);
        }
        public void duplicated_runs_dont_accidentally_accumulate_afterEach_calls()
        {
            AFixture fixture = new AFixture();

            var fakeGlobalSetupManager = new FakeGlobalSetupManager();

            TestPosition testPosition = TestPosition.At(1, 3, 2);

            var traceMessages = new List<string>();

            SpecificationRunner.RunTest(new TestContext()
            {
                FixtureContext = new FixtureContext(null, () => fixture, null, fakeGlobalSetupManager),
                Name = new TestName(),
                Position = testPosition
            }, traceMessages);

            fixture.ResetObservations();

            var traceMessages1 = new List<string>();

            SpecificationRunner.RunTest(new TestContext()
            {
                FixtureContext = new FixtureContext(null, () => fixture, null, fakeGlobalSetupManager),
                Name = new TestName(),
                Position = testPosition
            }, traceMessages1);

            expect_observation_matches(fixture.Observations, 1, 2, 3, 4, 5, 6, -2, -3, -4, 7, 8);
        }
        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);
        }
Example #5
0
        public void can_be_ran()
        {
            AFixture fixture = new AFixture();

            var fakeGlobalSetupManager = new FakeGlobalSetupManager();

            var traceMessages = new List <string>();

            SpecificationRunner.RunTest(new TestContext()
            {
                FixtureContext = new FixtureContext(null, () => fixture, null, fakeGlobalSetupManager),
                Name           = new TestName(),
                Position       = TestPosition.At(1, 3, 2)
            }, traceMessages);

            expect_observation_matches(fixture.Observations, 1, 2, 3, 4, 5, 6, 7, -2, -3, -4, 8);
        }
        public void can_be_ran()
        {
            AFixture fixture = new AFixture();

            var fakeGlobalSetupManager = new FakeGlobalSetupManager();

            var traceMessages = new List<string>();

            SpecificationRunner.RunTest(new TestContext()
            {
                FixtureContext = new FixtureContext(null, () => fixture, null, fakeGlobalSetupManager),
                Name = new TestName(),
                Position = TestPosition.At(1, 3, 2)
            }, traceMessages);

            expect_observation_matches(fixture.Observations, 1, 2, 3, 4, 5, 6, 7, -2, -3, -4, 8);
        }