public void op_FromString_string() { var expected = new HttpRequestLine("GET", "http://example.com/", "HTTP/1.1"); var actual = HttpRequestLine.FromString("GET http://example.com/ HTTP/1.1"); Assert.Equal(expected, actual); }
public void op_FromString_string_whenUriMissing() { Assert.Throws <UriFormatException>(() => HttpRequestLine.FromString("GET HTTP/1.1")); }
public void op_FromString_string_whenMethodMissing() { Assert.Throws <FormatException>(() => HttpRequestLine.FromString("http://example.com/ HTTP/1.1")); }
public void op_FromString_stringNull() { Assert.Throws <ArgumentNullException>(() => HttpRequestLine.FromString(null)); }
public void op_FromString_stringEmpty() { Assert.Throws <ArgumentOutOfRangeException>(() => HttpRequestLine.FromString(string.Empty)); }