コード例 #1
0
 public void Must_consider_correct_methods()
 {
     Assert.That(_routes, Has.Length.EqualTo(1));
     _responseMapper.AssertWasCalled(
         arg => arg.MapAsync(
             Arg <Func <IContainer> > .Is.Anything,
             Arg <Type> .Is.Equal(typeof(Endpoint)),
             Arg <MethodInfo> .Is.Equal(typeof(Endpoint).GetMethod("IncludedMethod")),
             Arg <Route.Routing.Route> .Is.Anything));
     _responseMapper.AssertWasNotCalled(
         arg => arg.MapAsync(
             Arg <Func <IContainer> > .Is.Anything,
             Arg <Type> .Is.Anything,
             Arg <MethodInfo> .Is.Equal("ExcludedMethod"),
             Arg <Route.Routing.Route> .Is.Anything));
 }
コード例 #2
0
            public async void Must_map_using_mapper()
            {
                await _autoRouteCollection.GenerateRouteCollectionAsync();

                _responseMapper.AssertWasCalled(arg => arg.MapAsync(Arg <Func <IContainer> > .Is.Anything, Arg <Type> .Is.Anything, Arg <MethodInfo> .Is.Anything, Arg <Route.Routing.Route> .Is.Anything));
            }