Example #1
0
        public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
        {
            fixtureResult.failed();

            fixtureResult.hasTest("outer test").thatFailsInAnUnspecifiedManner()
            .withFailureMessage("System.InvalidOperationException : Called it() within it().");
        }
        public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
        {
            fixtureResult.failed();

            fixtureResult.hasTest("has a valid test").thatErrors()
                .withFailureMessage("System.InvalidOperationException : Called it() within beforeEach().");
        }
        public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
        {
            fixtureResult.failed();

            fixtureResult.hasTest("outer test").thatFailsInAnUnspecifiedManner()
                .withFailureMessage("System.InvalidOperationException : Called it() within it().");
        }
        public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
        {
            fixtureResult.failed();

            fixtureResult.hasTest("broken describe").thatFails()
            .withFailureMessage("Attempted to divide by zero.");
        }
Example #5
0
        public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
        {
            fixtureResult.failed();
            fixtureResult.hasTrace(@"
failure_in_setup_doesnt_prevent_cleanup_in_same_scope
failure_in_setup_doesnt_prevent_cleanup");
        }
 public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
 {
     fixtureResult.failed();
     fixtureResult.hasTest("when in some context, then there is some text")
     .withFailureMessage("System.TimeZoneNotFoundException : no time!")
     .thatFailsInAnUnspecifiedManner();
 }
        public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
        {
            fixtureResult.failed();

            fixtureResult.hasTest("has a valid test").thatErrors()
            .withFailureMessage("System.InvalidOperationException : Called it() within beforeEach().");
        }
        public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
        {
            fixtureResult.succeeds();

            fixtureResult.hasTrace(@"
creating some_observable_A
creating some_observable_B
creating some_observable_C
disposing some_observable_C
disposing some_observable_B
disposing some_observable_A
creating some_observable_G
creating some_observable_G
creating some_observable_A
creating some_observable_B
creating some_observable_D
disposing some_observable_D
disposing some_observable_B
disposing some_observable_A
creating some_observable_A
creating some_observable_B
creating some_observable_D
creating some_observable_E
creating some_observable_F
disposing some_observable_F
disposing some_observable_E
disposing some_observable_D
disposing some_observable_B
disposing some_observable_A
disposing some_observable_G
");
        }
 public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
 {
     fixtureResult.failed();
     fixtureResult.hasTest("when in some context, then there is some text")
         .withFailureMessage("System.TimeZoneNotFoundException : no time!")
         .thatFailsInAnUnspecifiedManner();
 }
        public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
        {
            fixtureResult.failed();

            fixtureResult.hasTestWithFullName("NJasmineTests.Specs.report_test_failures_usefully.reports_exception_at_outermost_scope").thatFails()
            .withFailureMessage("Attempted to divide by zero.");
        }
        public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
        {
            fixtureResult.succeeds();

            fixtureResult.hasTrace(@"
            creating some_observable_A
            creating some_observable_B
            creating some_observable_C
            disposing some_observable_C
            disposing some_observable_B
            disposing some_observable_A
            creating some_observable_G
            creating some_observable_G
            creating some_observable_A
            creating some_observable_B
            creating some_observable_D
            disposing some_observable_D
            disposing some_observable_B
            disposing some_observable_A
            creating some_observable_A
            creating some_observable_B
            creating some_observable_D
            creating some_observable_E
            creating some_observable_F
            disposing some_observable_F
            disposing some_observable_E
            disposing some_observable_D
            disposing some_observable_B
            disposing some_observable_A
            disposing some_observable_G
            ");
        }
        public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
        {
            fixtureResult.failed();

            fixtureResult.hasTest("broken describe").thatFails()
                .withFailureMessage("Attempted to divide by zero.");
        }
        public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
        {
            fixtureResult.hasTest("trace information is not included on success, is a passing test")
            .thatSucceeds();

            fixtureResult.hasTest("trace information is included on failure, is a failing test")
            .thatErrors()
            .withDetailedMessageThat(
                message => Expect.That(message).ContainsInOrder(
                    "d e f",
                    "1 2 3",
                    "g h i",
                    "j k l"));

            fixtureResult.hasTest("globally tracked trace information only applies to the correct scope, scope with trace, test with trace")
            .thatErrors().withDetailedMessageThat(message =>
                                                  Assert.That(message, Is.StringContaining(ParticularyScopedTraceMessage)));

            fixtureResult.hasTest("globally tracked trace information only applies to the correct scope, test without trace")
            .thatErrors().withDetailedMessageThat(message =>
                                                  Assert.That(message, Is.Not.StringContaining(ParticularyScopedTraceMessage)));

            fixtureResult.hasTest("trace messages can be recorded during per-test cleanup, test with cleanup")
            .thatErrors().withDetailedMessageThat(message => Assert.That(message, Is.StringContaining("traced after test")));

            fixtureResult.hasTest("trace messages during global cleanup cause a failure of next test, test with global cleanup")
            .thatSucceeds();

            fixtureResult.hasTest("forced to fail by previous error")
            .thatErrors().withFailureMessage("Attempted to call trace() from within afterAll");
        }
 public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
 {
     fixtureResult.failed();
     fixtureResult.hasTrace(@"
     failure_in_setup_doesnt_prevent_cleanup_in_same_scope
     failure_in_setup_doesnt_prevent_cleanup");
 }
        public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
        {
            fixtureResult.succeeds();

            fixtureResult.hasTest("simple test");
            fixtureResult.hasTest("simple describe, simple test");
        }
Example #16
0
        private static void WriteTestResult(ITestNode testNode, IFixtureResult result)
        {
            ConsoleText.ColorCodes cColor = ConsoleText.ColorCodes.Red;
            string status = " FAIL! ";

            if (result.Right == (result.Right + result.Wrong + result.Exceptions))
            {
                cColor = ConsoleText.ColorCodes.Green;
                status = " PASS! ";
            }
            else if ((result.Exceptions != 0) && (result.Wrong == 0))
            {
                cColor = ConsoleText.ColorCodes.Yellow;
                status = " FAIL! ";
            }
            else
            {
                cColor = ConsoleText.ColorCodes.Red;
                status = " FAIL! ";
            }

            ConsoleText.SetColor(cColor);
            Console.Write(status);
            ConsoleText.SetColor(ConsoleText.DEFAULT_COLOR);
            if (testNode != null)
            {
                Console.Write(testNode.Name + "\t");
            }
            Console.Write("Assertions:\t Pass:{0} \t Fail:{1} \t Exception:{2} \t {3}", result.Right, result.Wrong,
                          result.Exceptions, result.GetTimeSpan().TotalSeconds + "sec");
        }
        public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
        {
            fixtureResult.failed();

            fixtureResult.hasTestWithFullName("NJasmineTests.Specs.report_test_failures_usefully.reports_exception_at_outermost_scope").thatFails()
                .withFailureMessage("Attempted to divide by zero.");
        }
        public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
        {
            fixtureResult.succeeds();

            fixtureResult.hasTest("simple test");
            fixtureResult.hasTest("simple describe, simple test");
        }
Example #19
0
 public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
 {
     fixtureResult.hasTest("shows stacktrace information for this failing test")
     .withDetailedMessageThat(message =>
     {
         Expect.That(() => Regex.Match(message, "at stacktrace_shows_fileposition_first.cs:\\d+ ").Success);
     });
 }
        public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
        {
            fixtureResult.failed();

            fixtureResult.hasTest("passes the test if the condition passes").thatSucceeds();
            fixtureResult.hasTest("fails the test if if the condition fails").thatErrors();
            fixtureResult.hasTest("expections can be set during discovery, fails this test").thatErrors();
        }
        public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
        {
            fixtureResult.succeeds();

            fixtureResult.hasTest("given the environment is in a particular state, when the system under test is used in a particular manner, then a particular result is expected");
            fixtureResult.hasTest("given the environment is in a particular state, given the environment is in an even more particular state, when the system is used in another manner, then another result is expected");
            fixtureResult.hasTest("given the environment is in a particular state, given the environment is in an even more particular state, when the system is used in another manner, then yet another result is expected");
        }
        public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
        {
            fixtureResult.failed();

            var stackTrace = fixtureResult.withStackTraces().Single();
            Assert.That(stackTrace, Is.Not.StringContaining("NJasmine.Core"));
            Assert.That(stackTrace, Is.Not.StringContaining("NJasmine.NUnit"));
        }
Example #23
0
        public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
        {
            fixtureResult.failed();

            fixtureResult.hasTest("passes the test if the condition passes").thatSucceeds();
            fixtureResult.hasTest("fails the test if if the condition fails").thatErrors();
            fixtureResult.hasTest("expections can be set during discovery, fails this test").thatErrors();
        }
 public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
 {
     fixtureResult.hasTest("shows stacktrace information for this failing test")
         .withDetailedMessageThat(message =>
         {
             Expect.That(() => Regex.Match(message, "at stacktrace_shows_fileposition_first.cs:\\d+ ").Success);
         });
 }
        public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
        {
            fixtureResult.succeeds();

            fixtureResult.hasTest("given the environment is in a particular state, when the system under test is used in a particular manner, then a particular result is expected");
            fixtureResult.hasTest("given the environment is in a particular state, given the environment is in an even more particular state, when the system is used in another manner, then another result is expected");
            fixtureResult.hasTest("given the environment is in a particular state, given the environment is in an even more particular state, when the system is used in another manner, then yet another result is expected");
        }
        public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
        {
            fixtureResult.failed();

            var stackTrace = fixtureResult.withStackTraces().Single();
            Assert.That(stackTrace, Is.StringContaining("NJasmine.Core"));

            //Assert.That(TestResultUtil.PatternForNJasmineAnonymousMethod.IsMatch(stackTrace));
        }
        public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
        {
            fixtureResult.failed();

            var stackTrace = fixtureResult.withStackTraces().Single();

            Assert.That(stackTrace, Is.Not.StringContaining("NJasmine.Core"));
            Assert.That(stackTrace, Is.Not.StringContaining("NJasmine.NUnit"));
        }
        public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
        {
            fixtureResult.succeeds();

            fixtureResult.hasSuite("given an outer block").thatsInconclusive().thatHasNoResults();

            fixtureResult.hasSuite("when ignore is set after a test the suite is inconclusive").thatSucceeds()
            .hasTest("then the earlier test runs", t => t.thatSucceeds())
            .doesNotHaveTestContaining("skipped");
        }
Example #29
0
        public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
        {
            fixtureResult.failed();

            var stackTrace = fixtureResult.withStackTraces().Single();

            Assert.That(stackTrace, Is.StringContaining("NJasmine.Core"));

            //Assert.That(TestResultUtil.PatternForNJasmineAnonymousMethod.IsMatch(stackTrace));
        }
        public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
        {
            fixtureResult.succeeds();

            fixtureResult.hasSuite("given an outer block").thatsInconclusive().thatHasNoResults();

            fixtureResult.hasSuite("when ignore is set after a test the suite is inconclusive").thatSucceeds()
                .hasTest("then the earlier test runs", t => t.thatSucceeds())
                .doesNotHaveTestContaining("skipped");
        }
        public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
        {
            fixtureResult.failed();

            fixtureResult.hasTest("when the arrange code tries to re-enter, has a valid test that will now fail")
                .thatErrors()
                .withFailureMessage("System.InvalidOperationException : Called it() within arrange().");

            fixtureResult.hasTest("when the arrange cleanup code tries to re-enter, has a valid test that will now fail")
                .thatErrors()
                .withFailureMessage("System.InvalidOperationException : Called it() within arrange().");
        }
        public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
        {
            fixtureResult.failed();

            fixtureResult.hasTest("when the arrange code tries to re-enter, has a valid test that will now fail")
            .thatErrors()
            .withFailureMessage("System.InvalidOperationException : Called it() within arrange().");

            fixtureResult.hasTest("when the arrange cleanup code tries to re-enter, has a valid test that will now fail")
            .thatErrors()
            .withFailureMessage("System.InvalidOperationException : Called it() within arrange().");
        }
            public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
            {
                if (!fixtureResult.WasRanByNUnit())
                    return;

                fixtureResult.succeeds();

                fixtureResult.hasTrace(@"
                running test 1
                running test 2
                TearDown NamespaceSetupB
                ");
            }
 public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
 {
     fixtureResult.succeeds();
     fixtureResult.hasTrace(@"
     First setup
     First test
     First cleanup
     First setup
     Second setup
     Second test
     Second cleanup
     First cleanup
     ");
 }
Example #35
0
        public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
        {
            fixtureResult.succeeds();
            fixtureResult.hasTrace(@"
First setup
First test
First cleanup
First setup
Second setup
Second test
Second cleanup
First cleanup
");
        }
Example #36
0
        public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
        {
            fixtureResult.succeeds();
            fixtureResult.hasTrace(@"
one
two
three
four
-four
-three
-two
-one
");
        }
 public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
 {
     fixtureResult.succeeds();
     fixtureResult.hasTrace(@"
     one
     two
     three
     four
     -four
     -three
     -two
     -one
     ");
 }
            public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
            {
                if (!fixtureResult.WasRanByNUnit())
                {
                    return;
                }

                fixtureResult.succeeds();

                fixtureResult.hasTrace(@"
running test 1
running test 2
TearDown NamespaceSetupB
");
            }
        public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
        {
            fixtureResult.failed();

            fixtureResult.hasTest("then reports the test with the correct count")
                .withFailureMessage("Failed with TotalRuns: 1");

            fixtureResult.hasTest("then reports the test with the correct count`2")
                .withFailureMessage("Failed with TotalRuns: 1");

            fixtureResult.hasTest("then reports the test with the correct count`3")
                .withFailureMessage("Failed with TotalRuns: 1");

            fixtureResult.hasTest("then reports the test with the correct count`4")
                .withFailureMessage("Failed with TotalRuns: 1");
        }
Example #40
0
        public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
        {
            fixtureResult.failed();

            fixtureResult.hasTest("repeated outer test").thatErrors();
            fixtureResult.hasTest("repeated outer test`2").thatErrors();
            fixtureResult.hasTest("repeated outer test`3").thatErrors();

            fixtureResult.hasTest("repeated unimplemented outer test").thatIsNotRunnable();
            fixtureResult.hasTest("repeated unimplemented outer test`2").thatIsNotRunnable();
            fixtureResult.hasTest("repeated unimplemented outer test`3").thatIsNotRunnable();

            fixtureResult.hasTest("repeated describe, repeated inner describe").thatFails();
            fixtureResult.hasTest("repeated describe, repeated inner describe`2").thatFails();
            fixtureResult.hasTest("repeated describe, repeated inner describe`3").thatFails();
        }
        public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
        {
            fixtureResult.succeeds();

            var suite = fixtureResult.hasSuite("when using category Foo then Bar").withCategories();

            suite.hasTest("then tests have Foo", t => t.withCategories("Foo"));

            suite.hasTest("then tests have Foo", t => t.withCategories("Foo"));

            suite.hasTest("then tests have For and Bar", t => t.withCategories("Foo", "Bar"));

            var nestedSuite = suite.hasSuite("when in a nested block and using a category").withCategories("Foo", "Bar");

            nestedSuite.hasTest("then the test only has category Baz", t => t.withCategories("Baz"));
        }
        public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
        {
            fixtureResult.failed();

            fixtureResult.hasTest("then reports the test with the correct count")
            .withFailureMessage("Failed with TotalRuns: 1");

            fixtureResult.hasTest("then reports the test with the correct count`2")
            .withFailureMessage("Failed with TotalRuns: 1");

            fixtureResult.hasTest("then reports the test with the correct count`3")
            .withFailureMessage("Failed with TotalRuns: 1");

            fixtureResult.hasTest("then reports the test with the correct count`4")
            .withFailureMessage("Failed with TotalRuns: 1");
        }
        public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
        {
            fixtureResult.failed();

            fixtureResult.hasTest("repeated outer test").thatErrors();
            fixtureResult.hasTest("repeated outer test`2").thatErrors();
            fixtureResult.hasTest("repeated outer test`3").thatErrors();

            fixtureResult.hasTest("repeated unimplemented outer test").thatIsNotRunnable();
            fixtureResult.hasTest("repeated unimplemented outer test`2").thatIsNotRunnable();
            fixtureResult.hasTest("repeated unimplemented outer test`3").thatIsNotRunnable();

            fixtureResult.hasTest("repeated describe, repeated inner describe").thatFails();
            fixtureResult.hasTest("repeated describe, repeated inner describe`2").thatFails();
            fixtureResult.hasTest("repeated describe, repeated inner describe`3").thatFails();
        }
        public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
        {
            fixtureResult.succeeds();

            var suite = fixtureResult.hasSuite("when using category Foo then Bar").withCategories();

            suite.hasTest("then tests have Foo", t => t.withCategories("Foo"));

            suite.hasTest("then tests have Foo", t => t.withCategories("Foo"));

            suite.hasTest("then tests have For and Bar", t => t.withCategories("Foo", "Bar"));

            var nestedSuite = suite.hasSuite("when in a nested block and using a category").withCategories("Foo", "Bar");

            nestedSuite.hasTest("then the test only has category Baz", t => t.withCategories("Baz"));
        }
        public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
        {
            fixtureResult.succeeds();
            fixtureResult.hasTrace(@"
BEFORE ALL
first test
SECOND BEFORE ALL
INNER BEFORE ALL
second test
third test
INNER AFTER ALL
DISPOSING INNER BEFORE ALL
SECOND AFTER ALL
DISPOSING SECOND BEFORE ALL
AFTER ALL
DISPOSING BEFORE ALL
");
        }
 public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
 {
     fixtureResult.succeeds();
     fixtureResult.hasTrace(@"
     BEFORE ALL
     first test
     SECOND BEFORE ALL
     INNER BEFORE ALL
     second test
     third test
     INNER AFTER ALL
     DISPOSING INNER BEFORE ALL
     SECOND AFTER ALL
     DISPOSING SECOND BEFORE ALL
     AFTER ALL
     DISPOSING BEFORE ALL
     ");
 }
Example #47
0
        public string GetResultHeader(IFixtureResult result)
        {
            string assertionText = string.Format("Assertions:\t Pass:{0} \t Fail:{1} \t Exception:{2} \t {3}",
                                                 result.Right,
                                                 result.Wrong,
                                                 result.Exceptions, result.GetTimeSpan().TotalSeconds + "sec");

            assertionText = assertionText.Replace("\t", "  ");
            string status = "pass";

            if ((result.Wrong + result.Exceptions) != 0)
            {
                status = "fail";
            }
            return
                (string.Format(
                     "<div style=\"border:1px solid silver;padding:5px \" class=\"{0}\"><strong>Assertions:</strong> {1}</div>",
                     status, assertionText));
        }
        public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
        {
            fixtureResult.succeeds();

            fixtureResult.hasTrace(@"
            test started, before include of a
            FixtureSetup some_Nunit_fixture_a
            after include of a
            first describe, before include of b
            FixtureSetup some_Nunit_fixture_b
            after include of b
            test started, before include of a
            SetUp some_Nunit_fixture_a
            after include of a
            first describe, before include of b
            SetUp some_Nunit_fixture_b
            after include of b
            first test
            TearDown some_Nunit_fixture_b
            TearDown some_Nunit_fixture_a
            before include of c
            FixtureSetup some_Nunit_fixture_c
            after include of c
            test started, before include of a
            SetUp some_Nunit_fixture_a
            after include of a
            first describe, before include of b
            SetUp some_Nunit_fixture_b
            after include of b
            before include of c
            SetUp some_Nunit_fixture_c
            after include of c
            second test test
            TearDown some_Nunit_fixture_c
            TearDown some_Nunit_fixture_b
            TearDown some_Nunit_fixture_a
            FixtureTearDown some_Nunit_fixture_c
            FixtureTearDown some_Nunit_fixture_b
            FixtureTearDown some_Nunit_fixture_a
            ");
        }
        public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
        {
            fixtureResult.succeeds();

            fixtureResult.hasTrace(@"
test started, before include of a
FixtureSetup some_Nunit_fixture_a
after include of a
first describe, before include of b
FixtureSetup some_Nunit_fixture_b
after include of b
test started, before include of a
SetUp some_Nunit_fixture_a
after include of a
first describe, before include of b
SetUp some_Nunit_fixture_b
after include of b
first test
TearDown some_Nunit_fixture_b
TearDown some_Nunit_fixture_a
before include of c
FixtureSetup some_Nunit_fixture_c
after include of c
test started, before include of a
SetUp some_Nunit_fixture_a
after include of a
first describe, before include of b
SetUp some_Nunit_fixture_b
after include of b
before include of c
SetUp some_Nunit_fixture_c
after include of c
second test test
TearDown some_Nunit_fixture_c
TearDown some_Nunit_fixture_b
TearDown some_Nunit_fixture_a
FixtureTearDown some_Nunit_fixture_c
FixtureTearDown some_Nunit_fixture_b
FixtureTearDown some_Nunit_fixture_a
");
        }
        public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
        {
            fixtureResult.failed();

            fixtureResult.hasTest("waitUntil() or expectEventually() can be used to have the test wait until a condition passes, given a condition that eventually evaluates to true, a normal expect works when no waits are left")
                .thatSucceeds();

            fixtureResult.hasTest("waitUntil() or expectEventually() can be used to have the test wait until a condition passes, given a condition that eventually evaluates to true, a normal expect fails when waits are left")
                .thatErrors();

            fixtureResult.hasTest("waitUntil() or expectEventually() can be used to have the test wait until a condition passes, given a condition that eventually evaluates to true, waitUntil will try multiple times")
                .thatSucceeds();

            fixtureResult.hasTest("waitUntil() or expectEventually() can be used to have the test wait until a condition passes, given a condition that eventually evaluates to true, expectEventually will try multiple times")
                .thatSucceeds();

            fixtureResult.hasTest("waitUntil() or expectEventually() can be used to have the test wait until a condition passes, waitUntil can be called during discovery, doesnt prevent discovery")
                .thatErrors();

            fixtureResult.hasTest("waitUntil() or expectEventually() can be used to have the test wait until a condition passes, expectEventually can be called during discovery, doesnt prevent discovery")
                .thatErrors();
        }
Example #51
0
        public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
        {
            fixtureResult.failed();

            fixtureResult.hasTest("waitUntil() or expectEventually() can be used to have the test wait until a condition passes, given a condition that eventually evaluates to true, a normal expect works when no waits are left")
            .thatSucceeds();

            fixtureResult.hasTest("waitUntil() or expectEventually() can be used to have the test wait until a condition passes, given a condition that eventually evaluates to true, a normal expect fails when waits are left")
            .thatErrors();

            fixtureResult.hasTest("waitUntil() or expectEventually() can be used to have the test wait until a condition passes, given a condition that eventually evaluates to true, waitUntil will try multiple times")
            .thatSucceeds();

            fixtureResult.hasTest("waitUntil() or expectEventually() can be used to have the test wait until a condition passes, given a condition that eventually evaluates to true, expectEventually will try multiple times")
            .thatSucceeds();

            fixtureResult.hasTest("waitUntil() or expectEventually() can be used to have the test wait until a condition passes, waitUntil can be called during discovery, doesnt prevent discovery")
            .thatErrors();

            fixtureResult.hasTest("waitUntil() or expectEventually() can be used to have the test wait until a condition passes, expectEventually can be called during discovery, doesnt prevent discovery")
            .thatErrors();
        }
Example #52
0
 public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
 {
     fixtureResult.failed();
     fixtureResult.hasTest("works").thatSucceeds();
     fixtureResult.hasTest("when using expect within beforeAll, fails").thatErrors();
 }
 public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
 {
     fixtureResult.hasTest("given some precondition, when the input is 0, then it runs").thatSucceeds();
     fixtureResult.hasTest("given some precondition, when the input is 1, then it runs").thatSucceeds();
 }
 public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
 {
     fixtureResult.hasTest("has a passing test").thatSucceeds();
     fixtureResult.hasTest("has a failing test").thatErrors();
 }
Example #55
0
 public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
 {
     fixtureResult.hasTest("does nothing if all substrings are present").thatSucceeds();
     fixtureResult.hasTest("fails if a substring is missing").thatErrors();
     fixtureResult.hasTest("fails if substrings are out of order").thatErrors();
 }
Example #56
0
 public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
 {
     fixtureResult.hasSuite("the browser is firefox").hasTest("it supports search", t => { });
     fixtureResult.hasSuite("the browser is internet explorer").hasTest("it supports search", t => { });
     fixtureResult.hasSuite("the browser is chrome").hasTest("it supports search", t => { });
 }
        public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
        {
            fixtureResult.hasTest("an unimplemented test() block").thatIsNotRunnable();

            fixtureResult.hasTest("nested too of course, an unimplemented test() block").thatIsNotRunnable();
        }
 public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
 {
     fixtureResult.failed();
     fixtureResult.hasTest("works").thatSucceeds();
     fixtureResult.hasTest("when using expect within beforeAll, fails").thatErrors();
 }
        public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
        {
            fixtureResult.hasTest("trace information is not included on success, is a passing test")
                .thatSucceeds();

            fixtureResult.hasTest("trace information is included on failure, is a failing test")
                .thatErrors()
                .withDetailedMessageThat(
                    message => Expect.That(message).ContainsInOrder(
                        "d e f",
                        "1 2 3",
                        "g h i",
                        "j k l"));

            fixtureResult.hasTest("globally tracked trace information only applies to the correct scope, scope with trace, test with trace")
                .thatErrors().withDetailedMessageThat(message =>
                Assert.That(message, Is.StringContaining(ParticularyScopedTraceMessage)));

            fixtureResult.hasTest("globally tracked trace information only applies to the correct scope, test without trace")
                .thatErrors().withDetailedMessageThat(message =>
                Assert.That(message, Is.Not.StringContaining(ParticularyScopedTraceMessage)));

            fixtureResult.hasTest("trace messages can be recorded during per-test cleanup, test with cleanup")
                .thatErrors().withDetailedMessageThat(message => Assert.That(message, Is.StringContaining("traced after test")));

            fixtureResult.hasTest("trace messages during global cleanup cause a failure of next test, test with global cleanup")
                .thatSucceeds();

            fixtureResult.hasTest("forced to fail by previous error")
                .thatErrors().withFailureMessage("Attempted to call trace() from within afterAll");
        }
Example #60
0
 public void Verify_NJasmine_implementation(IFixtureResult fixtureResult)
 {
     fixtureResult.hasTest("given some precondition, when the input is 0, then it runs").thatSucceeds();
     fixtureResult.hasTest("given some precondition, when the input is 1, then it runs").thatSucceeds();
 }