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

            await repository.VerifyCredentialsAsync(
                new LoginModel()
            {
                Login    = "******",
                Password = "******",
            }
                );
        }
예제 #2
0
 public async void ShouldNotVerifyNotAddedUser(
     DbUserRepository repository, LoginModel credentials) =>
 await Assert.ThrowsAsync <AuthenticationException>(() => repository.VerifyCredentialsAsync(credentials));