public void SetUp() { // you have to be an administrator to access the CMS controller Thread.CurrentPrincipal = new GenericPrincipal(new GenericIdentity("admin"), new[] { "Administrator" }); postageRepository = MockRepository.GenerateStub <IRepository <Postage> >(); orderableService = MockRepository.GenerateStub <IOrderableService <Postage> >(); httpContextService = MockRepository.GenerateStub <IHttpContextService>(); postageController = new PostageController { Repository = postageRepository, OrderableService = orderableService, HttpContextService = httpContextService }; }
public void SetUp() { // you have to be an administrator to access the CMS controller Thread.CurrentPrincipal = new GenericPrincipal(new GenericIdentity("admin"), new[] { "Administrator" }); postageRepository = MockRepository.GenerateStub<IRepository<Postage>>(); orderableService = MockRepository.GenerateStub<IOrderableService<Postage>>(); httpContextService = MockRepository.GenerateStub<IHttpContextService>(); postageController = new PostageController { Repository = postageRepository, OrderableService = orderableService, HttpContextService = httpContextService }; }