public void ShouldNotAcceptModificationsWithNullFolder() { Modification modification = new Modification(); PathFilter filter = new PathFilter(); filter.Pattern = "*.*"; Assert.IsFalse(filter.Accept(modification)); }
public PathFilterTestHelper(string xmlFragment, Modification[] modifications, bool[] expectedResults) { filter = new PathFilter(); NetReflector.Read(xmlFragment, filter); this.modifications = modifications; this.expectedResults = expectedResults; }
public void ShouldNotAcceptModificationsWithNullFilename() { Modification modification = new Modification(); modification.FolderName = "c:\\"; PathFilter filter = new PathFilter(); filter.Pattern = "c:\\*.*"; Assert.IsFalse(filter.Accept(modification)); }
public void DeeplyNestedFilters() { Modification[] modlist = new Modification[] { ModificationMother.CreateModification("x.cs", "/working/sources"), ModificationMother.CreateModification("Entries", "/working/sources/CVS"), ModificationMother.CreateModification("x.build", "/working/build"), ModificationMother.CreateModification("x.dll", "/working/build/target/sources") }; PathFilter filter = new PathFilter(); filter.Pattern = "**/sources/**/*.*"; filter.Accept(modlist[0]); }
public void CaseSensitivityTest() { Modification m = ModificationMother.CreateModification("x.xml", "/working/sources"); PathFilter filter = new PathFilter(); filter.Pattern = "**/*.xml"; Assert.IsTrue(filter.Accept(m)); m.FileName = "test.Xml"; Assert.IsFalse(filter.Accept(m)); filter.CaseSensitive = false; Assert.IsTrue(filter.Accept(m)); }