public async Task Setup() { context = await TestDatabase.GetDatabaseContext(); mockUsersService = new MockUsersService(context); mockAuthenticateService = new MockAuthenticateService(); mockWebHostEnvironment = new Mock <IWebHostEnvironment>(); sutSuccess = new RegisterController( mockUsersService.UsersServiceSuccessfulRequest.Object, mockAuthenticateService.AuthenticateServiceSuccessfulRequest.Object, mockWebHostEnvironment.Object); sutFailure = new RegisterController( mockUsersService.UsersServiceFailedRequest.Object, mockAuthenticateService.AuthenticateServiceFailedRequest.Object, mockWebHostEnvironment.Object); registerRequest = new RegisterRequest() { UserName = "******", FirstName = "Test", LastName = "User 3", NickName = "My Nickname", Email = "*****@*****.**", Password = "******", License = TestObjects.GetLicense(), RequestorId = 1, Paginator = new Paginator() }; baseRequest = TestObjects.GetBaseRequest(); }
public async Task Setup() { context = await TestDatabase.GetDatabaseContext(); mockUsersService = new MockUsersService(context); mockAppsService = new MockAppsService(context); sut = new PasswordResetController( mockUsersService.UsersServiceSuccessfulRequest.Object, mockAppsService.AppsServiceSuccessfulRequest.Object); passwordResetToken = Guid.NewGuid().ToString(); }
public async Task Setup() { context = await TestDatabase.GetDatabaseContext(); mockUsersService = new MockUsersService(context); mockAppsService = new MockAppsService(context); mockWebHostEnvironment = new Mock <IWebHostEnvironment>(); baseRequest = new BaseRequest(); updateUserRequest = new UpdateUserRequest() { UserName = "******", FirstName = "FirstName", LastName = "LastName", NickName = "MyNickname", Email = "*****@*****.**", License = TestObjects.GetLicense(), RequestorId = 1, Paginator = new Paginator() }; updatePasswordRequest = new UpdatePasswordRequest() { UserId = 1, NewPassword = "******" }; updateUserRoleRequest = new UpdateUserRoleRequest() { RoleIds = new List <int>() { 3 }, License = TestObjects.GetLicense(), RequestorId = 1, Paginator = new Paginator() }; sutSuccess = new UsersController( mockUsersService.UsersServiceSuccessfulRequest.Object, mockAppsService.AppsServiceSuccessfulRequest.Object, mockWebHostEnvironment.Object); sutFailure = new UsersController( mockUsersService.UsersServiceFailedRequest.Object, mockAppsService.AppsServiceSuccessfulRequest.Object, mockWebHostEnvironment.Object); }
public async Task Setup() { context = await TestDatabase.GetDatabaseContext(); mockUsersService = new MockUsersService(context); mockWebHostEnvironment = new Mock <IWebHostEnvironment>(); sutSuccess = new ConfirmEmailController( mockUsersService.UsersServiceSuccessfulRequest.Object, mockWebHostEnvironment.Object); sutFailure = new ConfirmEmailController( mockUsersService.UsersServiceFailedRequest.Object, mockWebHostEnvironment.Object); emailConfirmationToken = Guid.NewGuid().ToString(); }