コード例 #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 !);
                    });