public void MethodAuthorizingContextShouldBePopulatedForPostHttpMethod() { var service = new TestService(); MethodInfo method = service.GetType().GetMethod("Post"); Assert.That(method, Is.Not.Null); var behaviorContext = new MethodAuthorizingContext(service, method); Assert.That(behaviorContext.Service, Is.SameAs(service)); Assert.That(behaviorContext.Method, Is.SameAs(method)); Assert.That(behaviorContext.GetServiceContractType(), Is.EqualTo(typeof(ITestService))); Assert.That(behaviorContext.GetServiceType(), Is.EqualTo(typeof(TestService))); Assert.That(behaviorContext.GetMethodName(), Is.EqualTo(method.Name)); var httpMethods = behaviorContext.GetSupportedHttpMethods().ToList(); Assert.That(httpMethods.Contains(HttpMethod.Get), Is.False); Assert.That(httpMethods.Contains(HttpMethod.Head), Is.False); Assert.That(httpMethods.Contains(HttpMethod.Post), Is.True); Assert.That(httpMethods.Contains(HttpMethod.Put), Is.False); Assert.That(httpMethods.Contains(HttpMethod.Patch), Is.False); Assert.That(httpMethods.Contains(HttpMethod.Delete), Is.False); }