예제 #1
0
		public void ShouldNotAcceptModificationsWithNullFolder()
		{
			Modification modification = new Modification();
			PathFilter filter = new PathFilter();
			filter.Pattern = "*.*";
			Assert.IsFalse(filter.Accept(modification));
		}
예제 #2
0
        public PathFilterTestHelper(string xmlFragment,
			Modification[] modifications,
			bool[] expectedResults)
        {
            filter = new PathFilter();
            NetReflector.Read(xmlFragment, filter);

            this.modifications = modifications;
            this.expectedResults = expectedResults;
        }
예제 #3
0
 public void ShouldNotAcceptModificationsWithNullFilename()
 {
     Modification modification = new Modification();
     modification.FolderName = "c:\\";
     PathFilter filter = new PathFilter();
     filter.Pattern = "c:\\*.*";
     Assert.IsFalse(filter.Accept(modification));
 }
예제 #4
0
 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]);
 }
예제 #5
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));
 }