Ejemplo n.º 1
0
 public void TestHttpStatusCodes_GetCodeNumber_BrokenCodes()
 {
     Assert.AreEqual(-1, HttpStatusCodes.GetCodeNumber("40"));
     Assert.AreEqual(-1, HttpStatusCodes.GetCodeNumber("Not Found"));
     Assert.AreEqual(-1, HttpStatusCodes.GetCodeNumber("5000 Something"));
     Assert.AreEqual(-1, HttpStatusCodes.GetCodeNumber(""));
     Assert.AreEqual(-1, HttpStatusCodes.GetCodeNumber(null));
 }
Ejemplo n.º 2
0
 public void TestHttpStatusCodes_GetCodeNumber()
 {
     Assert.AreEqual(404, HttpDotNet.HttpStatusCodes.GetCodeNumber("404 Not Found"));
     Assert.AreEqual(404, HttpStatusCodes.GetCodeNumber("404 Something Else"));
     Assert.AreEqual(404, HttpStatusCodes.GetCodeNumber("404"));
 }