15 writes to Unit
Microsoft.Net.Http.Headers.Tests (15)
ContentRangeHeaderValueTest.cs (15)
76
range.
Unit
= "myunit";
79
Assert.Throws<ArgumentException>(() => range.
Unit
= null);
80
Assert.Throws<ArgumentException>(() => range.
Unit
= "");
81
Assert.Throws<FormatException>(() => range.
Unit
= " x");
82
Assert.Throws<FormatException>(() => range.
Unit
= "x ");
83
Assert.Throws<FormatException>(() => range.
Unit
= "x y");
90
range.
Unit
= "myunit";
107
range4.
Unit
= "BYTES";
109
range5.
Unit
= "myunit";
125
range4.
Unit
= "BYTES";
127
range5.
Unit
= "myunit";
151
new ContentRangeHeaderValue(1234567890123456789, 1234567890123456799) {
Unit
= "custom" });
154
new ContentRangeHeaderValue(123) {
Unit
= "custom" });
182
new ContentRangeHeaderValue(1234567890123456789, 1234567890123456799) {
Unit
= "custom" });
185
new ContentRangeHeaderValue(123) {
Unit
= "custom" });
10 references to Unit
Microsoft.Net.Http.Headers (4)
ContentRangeHeaderValue.cs (4)
152
StringSegment.Equals(
Unit
, other.
Unit
, StringComparison.OrdinalIgnoreCase));
158
var result = StringSegmentComparer.OrdinalIgnoreCase.GetHashCode(
Unit
);
177
sb.Append(
Unit
.AsSpan());
Microsoft.Net.Http.Headers.Tests (6)
ContentRangeHeaderValueTest.cs (6)
21
Assert.Equal("bytes", range.
Unit
.AsSpan());
42
Assert.Equal("bytes", range.
Unit
.AsSpan());
66
Assert.Equal("bytes", range.
Unit
.AsSpan());
77
Assert.Equal("myunit", range.
Unit
.AsSpan());
159
Assert.Equal("bytes", result.
Unit
.AsSpan());
190
Assert.Equal("bytes", result.
Unit
.AsSpan());