示例#1
0
                public async Task PassedEqualTo8Characters_ReturnsSuccess()
                {
                    var validator = new MinimumLengthPasswordStrengthValidator();

                    var result = await validator.Validate(new Password("12345678"));

                    Assert.True(result.Success);
                }
示例#2
0
                public async Task NullPassword_Throws()
                {
                    var validator = new MinimumLengthPasswordStrengthValidator();

                    await Assert.ThrowsAsync <ArgumentNullException>("password", async() =>
                    {
                        await validator.Validate(password: null !);
                    });