41 references to NameValueHeaderValue
Microsoft.Net.Http.Headers.Tests (41)
CacheControlHeaderValueTest.cs (9)
97cacheControl.Extensions.Add(new NameValueHeaderValue("custom")); 102cacheControl.Extensions.Add(new NameValueHeaderValue("custom")); 234cacheControl4.Extensions.Add(new NameValueHeaderValue("custom")); 238cacheControl5.Extensions.Add(new NameValueHeaderValue("custom")); 364cacheControl5.Extensions.Add(new NameValueHeaderValue("custom")); 368cacheControl6.Extensions.Add(new NameValueHeaderValue("custom")); 398expected.Extensions.Add(new NameValueHeaderValue("custom")); 492expected.Extensions.Add(new NameValueHeaderValue("custom")); 529expected.Extensions.Add(new NameValueHeaderValue("custom"));
MediaTypeHeaderValueTest.cs (3)
184Assert.Throws<NotSupportedException>(() => mediaType1.Parameters.Add(new NameValueHeaderValue("name"))); 185Assert.Throws<NotSupportedException>(() => mediaType1.Parameters.Remove(new NameValueHeaderValue("name"))); 404expected.Parameters.Add(new NameValueHeaderValue("custom"));
NameValueHeaderValueTest.cs (29)
11Assert.Throws<ArgumentException>(() => new NameValueHeaderValue(null)); 13Assert.Throws<ArgumentException>(() => new NameValueHeaderValue(string.Empty)); 60var pair0 = new NameValueHeaderValue("name"); 76var pair0 = new NameValueHeaderValue("name"); 145Assert.Throws<FormatException>(() => { var x = new NameValueHeaderValue("name"); x.Value = " x "; }); 146Assert.Throws<FormatException>(() => { var x = new NameValueHeaderValue("name"); x.Value = "x y"; }); 168var nameValue1 = new NameValueHeaderValue("text"); 169var nameValue2 = new NameValueHeaderValue("text"); 207var nameValue1 = new NameValueHeaderValue("text"); 208var nameValue2 = new NameValueHeaderValue("TEXT"); 215var nameValue1 = new NameValueHeaderValue("text"); 216var nameValue2 = new NameValueHeaderValue("text"); 260var nameValue1 = new NameValueHeaderValue("text"); 261var nameValue2 = new NameValueHeaderValue("TEXT"); 269CheckValidParse(" name", new NameValueHeaderValue("name")); 270CheckValidParse(" name ", new NameValueHeaderValue("name")); 304CheckValidTryParse(" name", new NameValueHeaderValue("name")); 481new NameValueHeaderValue("name2"), 483new NameValueHeaderValue("a"), 485new NameValueHeaderValue("b"), 486new NameValueHeaderValue("6"), 535new NameValueHeaderValue("name2"), 537new NameValueHeaderValue("a"), 539new NameValueHeaderValue("b"), 540new NameValueHeaderValue("6"), 600var header = new NameValueHeaderValue("test"); 614var header = new NameValueHeaderValue("test"); 624var header = new NameValueHeaderValue("test"); 639var header = new NameValueHeaderValue("test");