public void op_FromString_string_whenGetRelative() { var expected = new RequestLine("GET", "/", "HTTP/1.1"); var actual = RequestLine.FromString("GET / HTTP/1.1"); Assert.Equal(expected, actual); }
public void op_FromString_string_whenMissingRequestUri() { Assert.Throws <FormatException>(() => RequestLine.FromString("GET HTTP/1.1")); }
public void op_FromString_string_whenMissingHttpVersion() { Assert.Throws <FormatException>(() => RequestLine.FromString("GET /")); }
public void op_FromString_string_whenMissingHttpMethod() { Assert.Throws <FormatException>(() => RequestLine.FromString("/ HTTP/1.1")); }
public void op_FromString_string_whenLR() { Assert.Throws <FormatException>(() => RequestLine.FromString("999 Foo \n Bar")); }
public void op_FromString_stringNull() { Assert.Throws <ArgumentNullException>(() => RequestLine.FromString(null)); }
public void op_FromString_stringEmpty() { Assert.Throws <FormatException>(() => RequestLine.FromString(string.Empty)); }