public void SetUp() { _container = MockRepository.GenerateMock<IContainer>(); _container.Stub(arg => arg.GetInstance(typeof(Model))).Return(new Model()); _request = MockRepository.GenerateMock<HttpRequestBase>(); _mapper = new ModelMapper(_container); }
public void SetUp() { _route = new Route.Routing.Route("name", Guid.NewGuid(), "relative"); _httpRuntime = MockRepository.GenerateMock<IHttpRuntime>(); _container = MockRepository.GenerateMock<IContainer>(); _container.Stub(arg => arg.GetInstance<IHttpRuntime>()).Return(_httpRuntime); }
public void SetUp() { _attribute = new UrlRelativePathAttribute("relative", RequestValueComparer.CaseSensitiveRegex); _route = new Route.Routing.Route("name", Guid.NewGuid(), "relative"); _httpRuntime = MockRepository.GenerateMock<IHttpRuntime>(); _container = MockRepository.GenerateMock<IContainer>(); _container.Stub(arg => arg.GetInstance<IHttpRuntime>()).Return(_httpRuntime); }
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.Map(() => _container, typeof(Endpoint), typeof(Endpoint).GetMethod("Method"), _route); _request = MockRepository.GenerateMock<HttpRequestBase>(); _response = _route.ProcessResponse(_request); }