13 writes to Unit
Microsoft.Net.Http.Headers.Tests (13)
RangeHeaderValueTest.cs (13)
18range.Unit = "myunit"; 21Assert.Throws<ArgumentException>(() => range.Unit = null); 22Assert.Throws<ArgumentException>(() => range.Unit = ""); 23Assert.Throws<FormatException>(() => range.Unit = " x"); 24Assert.Throws<FormatException>(() => range.Unit = "x "); 25Assert.Throws<FormatException>(() => range.Unit = "x y"); 32range.Unit = "myunit"; 46range2.Unit = "BYTES"; 68range2.Unit = "BYTES"; 78range7.Unit = "other"; 95expected.Unit = "custom"; 101expected.Unit = "custom"; 134expected.Unit = "custom";
2 references to Unit
Microsoft.AspNetCore.HeaderParsing.Tests (1)
ParserTests.cs (1)
303Assert.Equal("bytes", result!.Unit);
Microsoft.Net.Http.Headers.Tests (1)
RangeHeaderValueTest.cs (1)
19Assert.Equal("myunit", range.Unit.AsSpan());