Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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);
 }