public void DetermineResult_gets_result_when_no_result_set(PasswordAuthenticationService <StubAuthenticationRequest> sut, StubAuthenticationRequest request) { // Arrange request.Result = null; // Act sut.DetermineResult(ref request); // Assert Assert.NotNull(request.Result); }
public void DetermineResult_creates_failure_result_when_password_is_not_verified(PasswordAuthenticationService <StubAuthenticationRequest> sut, StubAuthenticationRequest request) { // Arrange request.Result = null; request.PasswordVerified = false; // Act sut.DetermineResult(ref request); // Assert Assert.IsFalse(request.Result.Success); }
public void DetermineResult_does_not_change_result_when_already_set(PasswordAuthenticationService <StubAuthenticationRequest> sut, StubAuthenticationRequest request, AuthenticationResult result) { // Arrange request.Result = result; // Act sut.DetermineResult(ref request); // Assert Assert.AreSame(result, request.Result); }