예제 #1
0
        public void TestInitializer()
        {
            _vacationPageService = Substitute.For <IVacationPageService>();

            _vacationPageController = new VacationPageController(_vacationPageService, ModelMapper.Create());

            _vacationPageController.ControllerContext = Substitute.For <HttpControllerContext>();
            _vacationPageController.Request           = new HttpRequestMessage();
            _vacationPageController.Request.Properties.Add(HttpPropertyKeys.HttpConfigurationKey, new HttpConfiguration());
            _vacationPageController.Request.SetConfiguration(new HttpConfiguration());
            _vacationPageController.RequestContext.Principal =
                new ClaimsPrincipal(new ClaimsIdentity(new[] { new Claim(ClaimTypes.NameIdentifier, "1"), new Claim("OrganizationId", "1") }));
        }
예제 #2
0
 public VacationPageController(IVacationPageService vacationPageService, IMapper mapper)
 {
     _vacationPageService = vacationPageService;
     _mapper = mapper;
 }