Exemplo n.º 1
0
        public async Task ChangePassword_Test()
        {
            //Act
            await _profileAppService.ChangePassword(
                new ChangePasswordInput
            {
                CurrentPassword = "******",
                NewPassword     = "******"
            });

            //Assert
            var currentUser = await GetCurrentUserAsync();

            new PasswordHasher()
            .VerifyHashedPassword(currentUser.Password, "2mF9d8Ac!5")
            .ShouldBe(PasswordVerificationResult.Success);
        }
Exemplo n.º 2
0
        public async Task ChangePassword_Test()
        {
            //Act
            await _profileAppService.ChangePassword(
                new ChangePasswordInput
            {
                CurrentPassword = "******",
                NewPassword     = "******"
            });

            //Assert
            var currentUser = await GetCurrentUserAsync();

            LocalIocManager
            .Resolve <IPasswordHasher <User> >()
            .VerifyHashedPassword(currentUser, currentUser.Password, "2mF9d8Ac!5")
            .ShouldBe(PasswordVerificationResult.Success);
        }