public void write_and_open_a_test_editor() { var project = StoryTeller.Testing.DataMother.GrammarProject(); var test = project.LoadTests().FindTest("Sentences"); var builder = new TestEditorBuilder(); var document = builder.BuildTestEditor(test, project.LocalRunner().Library); document.WriteToFile("editor.htm"); var path = Path.GetFullPath("editor.htm"); Process.Start("iexplore.exe", path); }
public void Jquery_metadata_file_is_before_testeditor_file() { TestEditorBuilder builder = new TestEditorBuilder(); IProject project = DataMother.GrammarProject(); Test test = project.LoadTests() .GetAllTests().FirstOrDefault(x => x.Name == "Sentences"); FixtureLibrary library = new LibraryBuilder(new NulloFixtureObserver(), new CompositeFilter<Type>()).Library; HtmlDocument document = builder.BuildTestEditor(test, library); IEnumerable<JavascriptFile> files = Embeds.GetFiles(); string contentOfTheFirstFile = GetFileContents(files, JQUERY_METADATA_FILENAME); string contentOfTheSecondFile = GetFileContents(files, TEST_EDITOR_FILENAME); Assert.Less(document.ToString().IndexOf(contentOfTheFirstFile), document.ToString().IndexOf(contentOfTheSecondFile)); }