Exemplo 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);
        }
Exemplo 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);
        }
Exemplo 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);
 }