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