public void SetUp() { _mapper = new NoContentMapper(); _route = new Route.Routing.Route("name", Guid.NewGuid(), "relative"); _context = MockRepository.GenerateMock<HttpContextBase>(); _mapper.MapAsync(() => null, typeof(string), typeof(string).GetMethod("Trim", Type.EmptyTypes), _route); _response = _route.ProcessResponseAsync(_context).Result; }
public void SetUp() { _mapper = new NoContentMapper(); _route = new Route.Routing.Route("name", Guid.NewGuid(), "relative"); _context = MockRepository.GenerateMock <HttpContextBase>(); _mapper.MapAsync(() => null, typeof(string), typeof(string).GetMethod("Trim", Type.EmptyTypes), _route); _response = _route.ProcessResponseAsync(_context).Result; }
public void SetUp() { _parameterMapper = MockRepository.GenerateMock <IParameterMapper>(); _responseMethodReturnTypeMapper = new ResponseMethodReturnTypeMapper(_parameterMapper); _container = MockRepository.GenerateMock <IContainer>(); _container.Stub(arg => arg.GetInstance(typeof(Endpoint))).Return(new Endpoint()); _route = new Route.Routing.Route("name", Guid.NewGuid(), "relative"); _responseMethodReturnTypeMapper.MapAsync(() => _container, typeof(Endpoint), typeof(Endpoint).GetMethod("Method"), _route); _context = MockRepository.GenerateMock <HttpContextBase>(); _response = _route.ProcessResponseAsync(_context).Result; }
public void SetUp() { _parameterMapper = MockRepository.GenerateMock<IParameterMapper>(); _responseMethodReturnTypeMapper = new ResponseMethodReturnTypeMapper(_parameterMapper); _container = MockRepository.GenerateMock<IContainer>(); _container.Stub(arg => arg.GetInstance(typeof(Endpoint))).Return(new Endpoint()); _route = new Route.Routing.Route("name", Guid.NewGuid(), "relative"); _responseMethodReturnTypeMapper.MapAsync(() => _container, typeof(Endpoint), typeof(Endpoint).GetMethod("Method"), _route); _context = MockRepository.GenerateMock<HttpContextBase>(); _response = _route.ProcessResponseAsync(_context).Result; }