public void DotsInDirectoryAreIgnored()
 {
     var provider = new FileExtensionContentTypeProvider();
     string contentType;
     provider.TryGetContentType(@"/first.css/example.txt", out contentType).ShouldBe(true);
     contentType.ShouldBe("text/plain");
     provider.TryGetContentType(@"\second.css\example.txt", out contentType).ShouldBe(true);
     contentType.ShouldBe("text/plain");
 }
 public void BothSlashFormatsAreUnderstood()
 {
     var provider = new FileExtensionContentTypeProvider();
     string contentType;
     provider.TryGetContentType(@"/first/example.txt", out contentType).ShouldBe(true);
     contentType.ShouldBe("text/plain");
     provider.TryGetContentType(@"\second\example.txt", out contentType).ShouldBe(true);
     contentType.ShouldBe("text/plain");
 }
 public void DashedExtensionsShouldBeMatched()
 {
     var provider = new FileExtensionContentTypeProvider();
     string contentType;
     provider.TryGetContentType("known.dvr-ms", out contentType).ShouldBe(true);
     contentType.ShouldBe("video/x-ms-dvr");
 }
 public void KnownExtensionsReturnTrye()
 {
     var provider = new FileExtensionContentTypeProvider();
     string contentType;
     provider.TryGetContentType("known.txt", out contentType).ShouldBe(true);
     contentType.ShouldBe("text/plain");
 }
 public void DoubleDottedExtensionsAreNotSupported()
 {
     var provider = new FileExtensionContentTypeProvider();
     string contentType;
     provider.TryGetContentType("known.exe.config", out contentType).ShouldBe(false);
 }
 public void UnknownExtensionsReturnFalse()
 {
     var provider = new FileExtensionContentTypeProvider();
     string contentType;
     provider.TryGetContentType("unknown.ext", out contentType).ShouldBe(false);
 }