public void TestRuleSucceed() { var rule = new FileNameExactMatchRule { Criteria = "testfile" }; var fileInfo = new FileInfo(AppDomain.CurrentDomain.BaseDirectory + @"\testfile.txt"); Assert.IsTrue(rule.Match(fileInfo)); }
public void TestRuleFail() { var rule = new FileNameExactMatchRule { Criteria = "filetest" }; var fileInfo = new FileInfo(AppDomain.CurrentDomain.BaseDirectory + @"\testfile.txt"); Assert.IsFalse(rule.Match(fileInfo)); }