public void can_serialize_the_fixture_assembly_class() { var fa = new FixtureAssembly(null, "StoryTeller.Testing"); var stream = new MemoryStream(); var formatter = new BinaryFormatter(); formatter.Serialize(stream, fa); stream.Position = 0; var fa2 = (FixtureAssembly)formatter.Deserialize(stream); }
public ProjectValidationMessages Validate() { var messages = new ProjectValidationMessages(); if (TestFolder.IsEmpty()) { messages.Messages.Add("Test Folder must be specified"); } else if (!Directory.Exists(GetTestFolder())) { messages.Messages.Add("Test Folder '{0}' does not exist".ToFormat(GetTestFolder())); } if (BinaryFolder.IsEmpty()) { messages.Messages.Add("Binary Folder must be specified"); } else if (!Directory.Exists(GetBinaryFolder())) { messages.Messages.Add("Binary Folder '{0}' does not exist".ToFormat(GetBinaryFolder())); } if (FixtureAssembly.IsEmpty() && SystemTypeName.IsEmpty()) { messages.Messages.Add("Either Fixture Assembly or System Type Name needs to be specified"); } if (Name.IsEmpty()) { messages.Messages.Add("Name is required"); } if (FileName.IsEmpty()) { messages.Messages.Add("File Name is required"); } return(messages); }
public void pulls_the_current_filter_from_the_project() { var project = new Project { FixtureAssembly = typeof(GrammarMarker).Assembly.GetName().Name }; project.WorkspaceFor("1").AddFilter(new FixtureFilter() { Name = "North", Type = FilterType.Fixture }); project.WorkspaceFor("2").AddFilter(new FixtureFilter() { Name = "South", Type = FilterType.Fixture }); project.SelectWorkspaces(new string[] { "1", "2" }); var fa = new FixtureAssembly(project); fa.Filter.Filters.ShouldHaveTheSameElementsAs(project.CurrentFixtureFilter().Filters); }
public void SetUp() { fa = new FixtureAssembly(typeof(GrammarSystem).AssemblyQualifiedName, null); }
public void SetUp() { fa = new FixtureAssembly(null, GetType().Assembly.GetName().Name); }