コード例 #1
0
 public void IsAllowed_AskForPermittedUrl3_ShouldReturnTrue()
 {
     var urlGuard = new UrlFilter (_urlRules);
       Assert.That (urlGuard.IsAllowed ("http://this/is/allowed.html?key=value"), Is.True);
 }
コード例 #2
0
 public void IsAllowed_AskForWildcardedUrl_ShouldReturnTrue()
 {
     var urlGuard = new UrlFilter (_urlRules);
       Assert.That (urlGuard.IsAllowed ("http://fhis/is/allowed-and-valid"), Is.True);
 }
コード例 #3
0
 public void IsAllowed_AskForInexistentRule_ShouldReturnFalse()
 {
     var urlGuard = new UrlFilter (_urlRules);
       Assert.That (urlGuard.IsAllowed ("http://this/is/not/allowed.html"), Is.False);
 }
コード例 #4
0
 public void IsAllowed_AskForWildcardedUrl3_ShouldReturnTrue()
 {
     var urlGuard = new UrlFilter (_urlRules);
       Assert.That (urlGuard.IsAllowed ("http://this/is/also/allowed.html"), Is.True);
 }
コード例 #5
0
 public void IsAllowed_AskForSSLOnlyUrlWithSSL3_ShouldReturnTrue()
 {
     var urlGuard = new UrlFilter (_urlRules);
       Assert.That (urlGuard.IsAllowed ("https://this/is/secure.html"), Is.True);
 }
コード例 #6
0
 public void IsAllowed_AskForProhibitedUrl_ShouldReturnFalse()
 {
     var urlGuard = new UrlFilter (_urlRules);
       Assert.That (urlGuard.IsAllowed ("http://not/allowed.html"), Is.False);
 }
コード例 #7
0
 public void IsAllowed_AskForProhibitedUrl3_ShouldReturnFalse()
 {
     var urlGuard = new UrlFilter (_urlRules);
       Assert.That (urlGuard.IsAllowed ("ftp://another.test.de/badapp"), Is.False);
 }
コード例 #8
0
 public void IsAllowed_AskForProhibitedUrl2_ShouldReturnFalse()
 {
     var urlGuard = new UrlFilter (_urlRules);
       Assert.That (urlGuard.IsAllowed ("http://some.stuff.test.com/badapp"), Is.False);
 }