public void Setup() { var authSettings = SettingsFactory.CreateAuth(); var tokenGenerator = new TokenGenerator(authSettings); var store = new Mock <IUserStore <User> >(); _manager = new Mock <UserManager <User> >(store.Object, null, null, null, null, null, null, null, null); var tokenService = new Mock <ITokenService>(); _service = new UsersService(_manager.Object, tokenGenerator, tokenService.Object); }
public void Setup() { var authSettings = SettingsFactory.CreateAuth(); _tokenGenerator = new TokenGenerator(authSettings); _service = new Mock <ITokenService>(); _controller = new TokenController(_service.Object); _controller.AddControllerContext(_user); }
public void Setup() { var authSettings = SettingsFactory.CreateAuth(); var tokenGenerator = new TokenGenerator(authSettings); var store = new Mock <IUserStore <User> >(); _manager = new Mock <UserManager <User> >(store.Object, null, null, null, null, null, null, null, null); var tokenService = new Mock <ITokenService>(); var service = new UsersService(_manager.Object, tokenGenerator, tokenService.Object); _controller = new UsersController(_autoMapper.Create(_db), service); _controller.AddControllerContext(_user); }