Exemple #1
0
        public void TestRuleSucceed()
        {
            var rule = new FileNameExactMatchRule {
                Criteria = "testfile"
            };
            var fileInfo = new FileInfo(AppDomain.CurrentDomain.BaseDirectory + @"\testfile.txt");

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

            Assert.IsFalse(rule.Match(fileInfo));
        }