예제 #1
0
                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);
                }
예제 #2
0
                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);
                }
예제 #3
0
                public async Task NullCode_Throws()
                {
                    UserHelper helper = new FakeUserHelper1();

                    await Assert.ThrowsAsync <ArgumentNullException>("code", async() =>
                    {
                        await helper.ValidateEmailVerificationCode(
                            userKey: "1",
                            code: null);
                    });
                }