Beispiel #1
0
        public async void ShouldNotAddUserWithDuplicateLogin(DbUserRepository repository)
        {
            RegisterModel registrationInfo = new RegisterModel()
            {
                Username             = "******",
                Password             = "******",
                PasswordConfirmation = "пороль"
            };
            await repository.AddUserAsync(registrationInfo);

            await Assert.ThrowsAsync <RegistrationException>(() => repository.AddUserAsync(registrationInfo));
        }
Beispiel #2
0
 public async void ShouldAddUser(DbUserRepository repository) =>
 await repository.AddUserAsync(new RegisterModel()
 {
     Username             = "******",
     Password             = "******",
     PasswordConfirmation = "пороль"
 });
Beispiel #3
0
        public async void ShouldVerifyAddedUser(DbUserRepository repository)
        {
            await repository.AddUserAsync(new RegisterModel()
            {
                Username             = "******",
                Password             = "******",
                PasswordConfirmation = "пороль"
            });

            await repository.VerifyCredentialsAsync(
                new LoginModel()
            {
                Login    = "******",
                Password = "******",
            }
                );
        }