Match() 공개 메소드

public Match ( HttpMethod method, PathNodeType nodeType, TypeSpec resourceType ) : RouteAction
method HttpMethod
nodeType PathNodeType
resourceType TypeSpec
리턴 Pomona.Routing.RouteAction
예제 #1
0
 public void Match_ChildResource_Requires_ParentResource()
 {
     var methodObject = new HandlerMethod(typeof(HandlerMethodTests).GetMethod("QueryPlanetarySystems"),
                                          TypeMapper);
     Assert.That(
         methodObject.Match(HttpMethod.Get,
                            PathNodeType.Collection,
                            TypeMapper.FromType(typeof(PlanetarySystem))),
         Is.Null);
 }
예제 #2
0
 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);
 }
예제 #3
0
 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);
 }