17 references to CheckValidParse
Microsoft.Net.Http.Headers.Tests (17)
MediaTypeHeaderValueTest.cs (17)
391
CheckValidParse
("\r\n text/plain ", new MediaTypeHeaderValue("text/plain"));
392
CheckValidParse
("text/plain", new MediaTypeHeaderValue("text/plain"));
394
CheckValidParse
("\r\n text / plain ; charset = utf-8 ", new MediaTypeHeaderValue("text/plain") { Charset = "utf-8" });
395
CheckValidParse
(" text/plain;charset=utf-8", new MediaTypeHeaderValue("text/plain") { Charset = "utf-8" });
397
CheckValidParse
("text/plain; charset=iso-8859-1", new MediaTypeHeaderValue("text/plain") { Charset = "iso-8859-1" });
401
CheckValidParse
(" text/plain; custom=value;charset=utf-8", expected);
405
CheckValidParse
(" text/plain; custom", expected);
409
CheckValidParse
("text / plain ; custom =\r\n \"x\" ; charset = utf-8 ", expected);
413
CheckValidParse
("text/plain;custom=\"x\";charset=utf-8", expected);
416
CheckValidParse
("text/plain;", expected);
420
CheckValidParse
("text/plain;name=", expected);
424
CheckValidParse
("text/plain;name=value;", expected);
429
CheckValidParse
("text/plain; charset=iso-8859-1; q=1.0", expected);
434
CheckValidParse
("\r\n */xml; charset=utf-8; q=0.5", expected);
437
CheckValidParse
("*/*", expected);
442
CheckValidParse
("text/*; charset=utf-8; foo=bar", expected);
448
CheckValidParse
("text/plain; charset=utf-8; foo=bar; q=0.0", expected);