public BaseManager(IRepository repo, IMapper mapper, IValidator <T> validator, ILogger logger, IAuthManager <T, long> auth, IBaseSpecificationProvider <T> specs) { this.Repo = repo; this.Mapper = mapper; this.Validator = validator; this.Logger = logger; this.Auth = auth; this.Specs = specs; }
protected virtual T GetController(IBaseSpecificationProvider <U> specs) { Assert.IsNotNull(MapperConfig, "You must setup MapperConfig in a TestInitialize or TestMethod."); var c = (T)Activator.CreateInstance(typeof(T), new object[] { Mock.Of <IBaseManager <U, UKey> >(), specs }); c.ControllerContext = new ControllerContext() { HttpContext = new DefaultHttpContext() { User = Mock.Of <ClaimsPrincipal>(ip => ip.Identity == setupMockId()) } }; return(c); }