public void Match_QueryMethod_Does_Not_Match_IncorrectMethodName() { var methodObject = new HandlerMethod(typeof(HandlerMethodTests).GetMethod("GetCrayons"), TypeMapper); Assert.That( methodObject.Match(HttpMethod.Get, PathNodeType.Collection, TypeMapper.FromType(typeof(Critter))), Is.Null); }
public void Match_QueryMethod_PrefixedWithQuery_Matches_CorrectSignature() { var methodObject = new HandlerMethod(typeof(HandlerMethodTests).GetMethod("QueryCritters"), TypeMapper); Assert.That( methodObject.Match(HttpMethod.Get, PathNodeType.Collection, TypeMapper.FromType(typeof(Critter))), Is.Not.Null); }
public void Match_ChildResource_Takes_ParentResource() { var methodObject = new HandlerMethod(typeof(HandlerMethodTests).GetMethod("GetPlanetarySystems"), TypeMapper); Assert.That( methodObject.Match(HttpMethod.Get, PathNodeType.Collection, TypeMapper.FromType(typeof(PlanetarySystem))), Is.Not.Null); }