public void SetUpFixture() { CodeCoverageModule module = new CodeCoverageModule("Root.Tests"); // Add two methods in namespaces that start with the // same initial characters. CodeCoverageMethod rootTestsMethod = new CodeCoverageMethod("RunThis", "Root.Tests.MyTestFixture"); module.Methods.Add(rootTestsMethod); CodeCoverageMethod rootBarMethod = new CodeCoverageMethod("RunThis", "RootBar.MyTestFixture"); module.Methods.Add(rootBarMethod); childNamespaces = CodeCoverageMethod.GetChildNamespaces(module.Methods, "Root"); }
public void Init() { module = new CodeCoverageModule("XmlEditor.Tests"); attributeNameTestFixtureMethod = new CodeCoverageMethod("SuccessTest1", "ICSharpCode.XmlEditor.Parser.AttributeNameTestFixture"); module.Methods.Add(attributeNameTestFixtureMethod); abstractElementSchemaTestFixtureMethod = new CodeCoverageMethod("FileElementHasAttributeNamedType", "ICSharpCode.XmlEditor.Schema.AbstractElementSchemaTestFixture"); module.Methods.Add(abstractElementSchemaTestFixtureMethod); differentRootNamespaceTestFixtureMethod = new CodeCoverageMethod("DifferentRootNamespaceTestMethod", "RootNamespace.XmlEditor.DifferentRootNamespaceTestFixture"); module.Methods.Add(differentRootNamespaceTestFixtureMethod); sharpDevelopNamespace = module.RootNamespaces[0]; differentRootNamespace = module.RootNamespaces[1]; xmlEditorNamespace = (CodeCoverageMethod.GetChildNamespaces(module.Methods, sharpDevelopNamespace))[0]; }
public void NoNamespacesBelowXmlEditorSchemaNamespace() { Assert.AreEqual(0, CodeCoverageMethod.GetChildNamespaces(module.Methods, "ICSharpCode.XmlEditor.Schema").Count); }
public void OnlyOneSharpDevelopChildNamespace() { Assert.AreEqual(1, CodeCoverageMethod.GetChildNamespaces(module.Methods, sharpDevelopNamespace).Count); }