コード例 #1
0
        public void fixture_library_loaded_with_no_syntax_errors()
        {
            var library = new FixtureLibrary();

            library.HasErrors().ShouldBeFalse();

            ClassUnderTest.HandleMessage(new BinaryRecycleFinished(library));

            MockFor <IStatusView>().AssertWasCalled(x => x.SyntaxErrorText = "No syntax errors");
        }
コード例 #2
0
        public void fixture_library_loaded_with_syntax_errors()
        {
            var library = new FixtureLibrary();
            StubGrammarStructure structure = new StubGrammarStructure()
                                             .AddError("bad error!")
                                             .AddError("bad error 2!")
                                             .AddError("bad error 3!");

            library.FixtureFor("math").AddStructure("g1", structure);
            library.HasErrors().ShouldBeTrue();

            ClassUnderTest.HandleMessage(new BinaryRecycleFinished(library));

            MockFor <IStatusView>().AssertWasCalled(x => x.SyntaxErrorText = "3 syntax error(s)");
        }