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