예제 #1
0
 public void ShouldNotMatchDifferentMediaType()
 {
     var mediaType = new MediaType("text/html");
     Assert.That(mediaType.Matches("text/xml"), Is.False);
 }
예제 #2
0
 public void ShouldMatchWildcardSubTypeCaseInsensitive()
 {
     var mediaType = new MediaType("text/html");
     Assert.That(mediaType.Matches("TEXT/*"));
 }
예제 #3
0
 public void ShouldMatchExact()
 {
     var mediaType = new MediaType("text/html");
     Assert.That(mediaType.Matches("text/html"), Is.True);
 }
예제 #4
0
 public void ShouldMatchWildcardedSubType()
 {
     var mediaType = new MediaType("text/html");
     Assert.That(mediaType.Matches("text/*"));
 }
예제 #5
0
 public void MatchingIsCaseInsensitive()
 {
     var mediaType = new MediaType("text/html");
     Assert.That(mediaType.Matches("TEXT/HTML"));
 }