예제 #1
0
        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);
        }
예제 #2
0
 public void op_FromString_string_whenMissingRequestUri()
 {
     Assert.Throws <FormatException>(() => RequestLine.FromString("GET HTTP/1.1"));
 }
예제 #3
0
 public void op_FromString_string_whenMissingHttpVersion()
 {
     Assert.Throws <FormatException>(() => RequestLine.FromString("GET /"));
 }
예제 #4
0
 public void op_FromString_string_whenMissingHttpMethod()
 {
     Assert.Throws <FormatException>(() => RequestLine.FromString("/ HTTP/1.1"));
 }
예제 #5
0
 public void op_FromString_string_whenLR()
 {
     Assert.Throws <FormatException>(() => RequestLine.FromString("999 Foo \n Bar"));
 }
예제 #6
0
 public void op_FromString_stringNull()
 {
     Assert.Throws <ArgumentNullException>(() => RequestLine.FromString(null));
 }
예제 #7
0
 public void op_FromString_stringEmpty()
 {
     Assert.Throws <FormatException>(() => RequestLine.FromString(string.Empty));
 }