示例#1
0
        public void GeneratedRuleShouldBeAbleToHandleEmptyUrl()
        {
            var context = new FakeActivityContext{ Url = String.Empty };
            var list = Compile("WHEN URL = '%something' THEN IGNORE ACTIVITY");

            Assert.That(list[0].Apply(context), Is.False);
        }
示例#2
0
        public void GeneratedRuleShouldBeAbleToHandleEmptyHeaders()
        {
            var context = new FakeActivityContext { RequestHeaders = new NameValueCollection() };
            var list = Compile("WHEN REQUEST HEADER 'Accept-Encoding' = '%something' THEN IGNORE ACTIVITY");

            Assert.That(list[0].Apply(context), Is.False);
        }
示例#3
0
 public void ShouldCompileRuleWithUrlConditionNotEqualTo()
 {
     var context = new FakeActivityContext { Url = "notsomething" };
     var list = Compile("WHEN URL != 'something' THEN IGNORE ACTIVITY");
     Assert.That(list[0].Apply(context), Is.True);
 }