Exemple #1
0
        public JavaScriptTestFile TestEditor()
        {
            JavaScriptTestFile file = new JavaScriptTestFile("Test Editor Tester").TestFile("TestEditorTester.js")
                                      .Fixtures(x => x.AddFixturesFromAssemblyContaining <SentenceFixture>());

            var testEditor =
                new TestEditorTag(FixtureLibrary.For(x => x.AddFixturesFromAssemblyContaining <SentenceFixture>()));

            file.Html(x => x.Add("div").Append(testEditor));

            Project project = DataMother.GrammarProject();

            project.LoadTests().GetAllTests().Each(test =>
            {
                string testName = test.Name.Replace(" ", "_");

                Debug.WriteLine(testName);

                file.AddTest(testName, test);
                file.Html(x => x.Add("br"));
                file.Html(
                    x => x.Add("a").Text(test.Name).AddClass("test-link").Attr("title", testName).Attr("href", "#"));
            });


            return(file);
        }
Exemple #2
0
        protected override void addChildren(string title)
        {
            var select = Add("h2").Text("Test:  ").Add <SelectTag>();

            select.Id("testName");


            Project project = DataMother.GrammarProject();

            AddTest("Blank", new Test("Blank"));
            select.Option("Blank", "Blank");

            project.LoadTests().GetAllTests().Each(test =>
            {
                string testName = test.Name.Replace(" ", "_");

                select.Option(test.Name, testName);

                AddTest(testName, test);
            });

            Add("hr");

            FixtureLibrary library = FixtureLibrary.For(x => x.AddFixturesFromAssemblyContaining <SentenceFixture>());

            Add("div").Append(new TestEditorTag(library));
        }
 public void SetUp()
 {
     runner    = TestRunnerBuilder.For(x => x.AddFixturesFromAssemblyContaining <GrammarMarker>());
     hierarchy = DataMother.GrammarProject().LoadTests();
 }