public async Task WhenCalled_ReturnsTrue() { var helper = new FakeUserHelper1(); helper.FakeSingleUseTokenService.Validate_Output = true; var result = await helper.ValidateEmailVerificationCode( new UserKey("1"), 1111); Assert.True(result); }
public async Task InvalidToken_ReturnsFalse() { var helper = new FakeUserHelper1(); helper.FakeSingleUseTokenService.Validate_Output = false; var result = await helper.ValidateEmailVerificationCode( new UserKey("1"), 1111); Assert.False(result); }
public async Task NullCode_Throws() { UserHelper helper = new FakeUserHelper1(); await Assert.ThrowsAsync <ArgumentNullException>("code", async() => { await helper.ValidateEmailVerificationCode( userKey: "1", code: null); }); }