75 references to StringWithQualityHeaderValue
Microsoft.Net.Http.Headers.Tests (75)
StringWithQualityHeaderValueTest.cs (75)
23
var value = new
StringWithQualityHeaderValue
("token", 0.5);
27
Assert.Throws<ArgumentException>(() => new
StringWithQualityHeaderValue
(null, 0.1));
28
Assert.Throws<ArgumentException>(() => new
StringWithQualityHeaderValue
("", 0.1));
29
Assert.Throws<FormatException>(() => new
StringWithQualityHeaderValue
("in valid", 0.1));
31
Assert.Throws<ArgumentOutOfRangeException>(() => new
StringWithQualityHeaderValue
("t", 1.1));
32
Assert.Throws<ArgumentOutOfRangeException>(() => new
StringWithQualityHeaderValue
("t", -0.1));
41
value = new
StringWithQualityHeaderValue
("token", 0.1);
44
value = new
StringWithQualityHeaderValue
("token", 0);
47
value = new
StringWithQualityHeaderValue
("token", 1);
51
value = new
StringWithQualityHeaderValue
("token", 0.56789);
58
var value1 = new
StringWithQualityHeaderValue
("t", 0.123);
59
var value2 = new
StringWithQualityHeaderValue
("t", 0.123);
60
var value3 = new
StringWithQualityHeaderValue
("T", 0.123);
62
var value5 = new
StringWithQualityHeaderValue
("x", 0.123);
63
var value6 = new
StringWithQualityHeaderValue
("t", 0.5);
64
var value7 = new
StringWithQualityHeaderValue
("t", 0.1234);
81
var value1 = new
StringWithQualityHeaderValue
("t", 0.123);
82
var value2 = new
StringWithQualityHeaderValue
("t", 0.123);
83
var value3 = new
StringWithQualityHeaderValue
("T", 0.123);
85
var value5 = new
StringWithQualityHeaderValue
("x", 0.123);
86
var value6 = new
StringWithQualityHeaderValue
("t", 0.5);
87
var value7 = new
StringWithQualityHeaderValue
("t", 0.1234);
107
CheckValidParse("text;q=0.5", new
StringWithQualityHeaderValue
("text", 0.5));
108
CheckValidParse("text ; q = 0.5", new
StringWithQualityHeaderValue
("text", 0.5));
109
CheckValidParse("\r\n text ; q = 0.5 ", new
StringWithQualityHeaderValue
("text", 0.5));
111
CheckValidParse(" \r\n text \r\n ; \r\n q = 0.123", new
StringWithQualityHeaderValue
("text", 0.123));
112
CheckValidParse(" text ; q = 0.123 ", new
StringWithQualityHeaderValue
("text", 0.123));
113
CheckValidParse("text;q=1 ", new
StringWithQualityHeaderValue
("text", 1));
115
CheckValidParse("*;q=0.7", new
StringWithQualityHeaderValue
("*", 0.7));
117
CheckValidParse("t;q=0.", new
StringWithQualityHeaderValue
("t", 0));
118
CheckValidParse("t;q=1.", new
StringWithQualityHeaderValue
("t", 1));
119
CheckValidParse("t;q=1.000", new
StringWithQualityHeaderValue
("t", 1));
120
CheckValidParse("t;q=0.12345678", new
StringWithQualityHeaderValue
("t", 0.12345678));
121
CheckValidParse("t ; q = 0", new
StringWithQualityHeaderValue
("t", 0));
123
CheckValidParse("unicode-1-1; q=0.8", new
StringWithQualityHeaderValue
("unicode-1-1", 0.8));
168
CheckValidTryParse("text;q=0.5", new
StringWithQualityHeaderValue
("text", 0.5));
169
CheckValidTryParse("text ; q = 0.5", new
StringWithQualityHeaderValue
("text", 0.5));
170
CheckValidTryParse("\r\n text ; q = 0.5 ", new
StringWithQualityHeaderValue
("text", 0.5));
172
CheckValidTryParse(" \r\n text \r\n ; \r\n q = 0.123", new
StringWithQualityHeaderValue
("text", 0.123));
225
new
StringWithQualityHeaderValue
("text3", 0.5),
226
new
StringWithQualityHeaderValue
("text4", 0.5),
227
new
StringWithQualityHeaderValue
("text5", 0.5),
228
new
StringWithQualityHeaderValue
("text6", 0.05),
230
new
StringWithQualityHeaderValue
("text8", 0.5),
232
new
StringWithQualityHeaderValue
("text10", 0.5),
262
new
StringWithQualityHeaderValue
("text3", 0.5),
263
new
StringWithQualityHeaderValue
("text4", 0.5),
264
new
StringWithQualityHeaderValue
("text5", 0.5),
265
new
StringWithQualityHeaderValue
("text6", 0.05),
267
new
StringWithQualityHeaderValue
("text8", 0.5),
269
new
StringWithQualityHeaderValue
("text10", 0.5),
299
new
StringWithQualityHeaderValue
("text3", 0.5),
300
new
StringWithQualityHeaderValue
("text4", 0.5),
301
new
StringWithQualityHeaderValue
("text5", 0.5),
302
new
StringWithQualityHeaderValue
("text6", 0.05),
304
new
StringWithQualityHeaderValue
("text8", 0.5),
306
new
StringWithQualityHeaderValue
("text10", 0.5),
336
new
StringWithQualityHeaderValue
("text3", 0.5),
337
new
StringWithQualityHeaderValue
("text4", 0.5),
338
new
StringWithQualityHeaderValue
("text5", 0.5),
339
new
StringWithQualityHeaderValue
("text6", 0.05),
341
new
StringWithQualityHeaderValue
("text8", 0.5),
343
new
StringWithQualityHeaderValue
("text10", 0.5),
373
new
StringWithQualityHeaderValue
("text3", 0.5),
374
new
StringWithQualityHeaderValue
("text4", 0.5),
376
new
StringWithQualityHeaderValue
("text5", 0.5),
377
new
StringWithQualityHeaderValue
("text6", 0.05),
379
new
StringWithQualityHeaderValue
("text8", 0.5),
381
new
StringWithQualityHeaderValue
("text10", 0.5),
431
new
StringWithQualityHeaderValue
("text3", 0.5),
432
new
StringWithQualityHeaderValue
("text4", 0.5),
434
new
StringWithQualityHeaderValue
("text5", 0.5),
435
new
StringWithQualityHeaderValue
("text6", 0.05),
437
new
StringWithQualityHeaderValue
("text8", 0.5),
439
new
StringWithQualityHeaderValue
("text10", 0.5),