public void ForHttpMethod_WhenPostAndGetIsAllowedAndDeleteIsTried_IsFalse() { AccessibleThroughAttribute attrib = new AccessibleThroughAttribute(Verb.Post | Verb.Get); Assert.IsFalse(attrib.ForHttpMethod(Verb.Delete)); }
public void HttpMethodToVerb_WhenInvalidVerbUsed_Throws() { AccessibleThroughAttribute.HttpMethodToVerb("GOOSE"); Assert.Fail(); }
public void ForHttpMethod_WhenPostIsAllowedAndPostIsTried_IsTrue() { AccessibleThroughAttribute attrib = new AccessibleThroughAttribute(Verb.Post); Assert.IsTrue(attrib.ForHttpMethod(Verb.Post)); }
public void HttpMethodToVerb_WithMultipleMethods_ConvertsToVerb() { Assert.AreEqual(Verb.Get | Verb.Post, AccessibleThroughAttribute.HttpMethodToVerb("GET, POST")); }
public void HttpMethodToVerb_WithSingleMethod_ConvertsToVerb() { Assert.AreEqual(Verb.Get, AccessibleThroughAttribute.HttpMethodToVerb("GET")); }
public void ForHttpMethod_WhenPostAndGetIsAllowedAndDeleteIsTried_IsFalse() { var attrib = new AccessibleThroughAttribute(Verb.Post | Verb.Get); Assert.IsFalse(attrib.ForHttpMethod(Verb.Delete)); }
public void ForHttpMethod_WhenPostIsAllowedAndPostIsTried_IsTrue() { var attrib = new AccessibleThroughAttribute(Verb.Post); Assert.IsTrue(attrib.ForHttpMethod(Verb.Post)); }
public void ForHttpMethod_WhenGetIsAllowedAndGetIsTried_IsTrue() { var attrib = new AccessibleThroughAttribute(Verb.Get); Assert.IsTrue(attrib.ForHttpMethod(Verb.Get)); }