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 = StoryTeller.Testing.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);
        }
 public JavaScriptTestFile OneOrMoreSelectionMode()
 {
     return(new JavaScriptTestFile("One Or More Selection Mode Tester")
            .Fixtures(x => x.AddFixturesFromAssemblyContaining <SentenceFixture>())
            .TestFile("OneOrMoreSelectionModeTester.js")
            .AddTest("singleTest", new Test("single", x => x.Add(new Section("OneOrMoreSelection"))))
            .Html(x =>
     {
         var testEditor =
             new TestEditorTag(FixtureLibrary.For(o => o.AddFixturesFromAssemblyContaining <SentenceFixture>()));
         x.Add("div").Append(testEditor);
     }));
 }
 public JavaScriptTestFile MandatoryAutoSelect()
 {
     return(new JavaScriptTestFile("Mandatory Auto Selection Behavior")
            .Fixtures(x => x.AddFixturesFromAssemblyContaining <SentenceFixture>())
            .TestFile("MandatorySelectionTester.js")
            .AddTest("mandatoryTest", new Test("madatoryTest", x => x.Add(new Section("MandatorySelection"))))
            .Html(x =>
     {
         var testEditor =
             new TestEditorTag(FixtureLibrary.For(o => o.AddFixturesFromAssemblyContaining <SentenceFixture>()));
         x.Add("div").Append(testEditor);
     }));
 }
        private void addTestEditor(HtmlDocument document, FixtureLibrary library)
        {
            var editor = new TestEditorTag(library);

            document.Add(editor);
        }
 public void SetUp()
 {
     library = FixtureLibrary.For(x => x.AddFixturesFromAssemblyContaining <SentenceFixture>());
     tag     = new TestEditorTag(library);
 }