コード例 #1
0
        public void ShouldNotSupportNonAddsedMediaTypeWithoutWildcard()
        {
            var map = new MediaTypeFormatMap();

            map.Add("text/html", "html");
            Assert.That(map.SupportsMediaType("text/plain"), Is.False);
        }
コード例 #2
0
        public void ShouldSupportWildCardedMediaType()
        {
            var map = new MediaTypeFormatMap();

            map.Add("text/html", "html");
            Assert.That(map.SupportsMediaType("*/*"), Is.True);
        }
コード例 #3
0
        public void EmptyMapShouldNotHaveAnyMediaTypes()
        {
            var map = new MediaTypeFormatMap();

            Assert.That(map.SupportsMediaType("*/*"), Is.False);
        }