Esempio n. 1
0
        public void MediaTypesTest()
        {
            const string jpg = "https://i.ytimg.com/vi/r45a-l9Gqdk/hqdefault.jpg";

            var i = MediaTypes.Identify(jpg);

            Assert.True(Network.IsUri(jpg, out var u));
            Assert.True(MediaTypes.GetExtensions(i).Contains("jpe"));
            Assert.True(MediaTypes.GetTypeComponent(i) == "image");
            Assert.True(MediaTypes.GetSubTypeComponent(i) == "jpeg");
        }