public void SetUp() { _server = MockRepository.GenerateMock <HttpServerUtilityBase>(); _context = MockRepository.GenerateMock <HttpContextBase>(); _context.Stub(arg => arg.Server).Return(_server); _mapper = new HttpServerUtilityBaseMapper(); }
public void SetUp() { _server = MockRepository.GenerateMock <HttpServerUtilityBase>(); _context = MockRepository.GenerateMock <HttpContextBase>(); _context.Stub(arg => arg.Server).Return(_server); _mapper = new HttpServerUtilityBaseMapper(); Type type = typeof(When_mapping_parameter); MethodInfo methodInfo = type.GetMethod("Method", BindingFlags.NonPublic | BindingFlags.Instance); ParameterInfo parameterInfo = methodInfo.GetParameters()[0]; _result = _mapper.MapAsync(_context, type, methodInfo, parameterInfo).Result; }