public void ParseStrictList_WithSomeInvlaidValues_Throws()
        {
            var inputs = new[]
            {
                "text/html,application/xhtml+xml, ignore-this, ignore/this",
                "application/xml;q=0.9,image/webp,*/*;q=0.8"
            };

            Assert.Throws <FormatException>(() => MediaTypeHeaderValue.ParseStrictList(inputs));
        }
        public void ParseStrictList_SetOfValidValueStrings_ReturnsValues()
        {
            var inputs  = new[] { "text/html,application/xhtml+xml,", "application/xml;q=0.9,image/webp,*/*;q=0.8" };
            var results = MediaTypeHeaderValue.ParseStrictList(inputs);

            var expectedResults = new[]
            {
                new MediaTypeHeaderValue("text/html"),
                new MediaTypeHeaderValue("application/xhtml+xml"),
                new MediaTypeHeaderValue("application/xml", 0.9),
                new MediaTypeHeaderValue("image/webp"),
                new MediaTypeHeaderValue("*/*", 0.8),
            }.ToList();

            Assert.Equal(expectedResults, results);
        }