示例#1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void testPasswordWithoutSpecialChar()
        public virtual void testPasswordWithoutSpecialChar()
        {
            PasswordPolicyResult result = identityService.checkPasswordAgainstPolicy(policy, "LongPassw0rd");

            checkThatPasswordWasInvalid(result);

            PasswordPolicyRule rule = result.ViolatedRules[0];

            assertThat(rule.Placeholder, @is(PasswordPolicySpecialCharacterRuleImpl.PLACEHOLDER));
            assertThat(rule, instanceOf(typeof(PasswordPolicySpecialCharacterRuleImpl)));
        }
示例#2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void testShortPassword()
        public virtual void testShortPassword()
        {
            PasswordPolicyResult result = identityService.checkPasswordAgainstPolicy(policy, "Pas$w0rd");

            checkThatPasswordWasInvalid(result);

            PasswordPolicyRule rule = result.ViolatedRules[0];

            assertThat(rule.Placeholder, @is(PasswordPolicyLengthRuleImpl.PLACEHOLDER));
            assertThat(rule, instanceOf(typeof(PasswordPolicyLengthRuleImpl)));
        }
示例#3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void testPasswordWithoutLowerCase()
        public virtual void testPasswordWithoutLowerCase()
        {
            PasswordPolicyResult result = identityService.checkPasswordAgainstPolicy(policy, "LONGPAS$W0RD");

            checkThatPasswordWasInvalid(result);

            PasswordPolicyRule rule = result.ViolatedRules[0];

            assertThat(rule.Placeholder, @is(PasswordPolicyLowerCaseRuleImpl.PLACEHOLDER));
            assertThat(rule, instanceOf(typeof(PasswordPolicyLowerCaseRuleImpl)));
        }
示例#4
0
 public CheckPasswordPolicyRuleDto(PasswordPolicyRule rule, bool valid) : base(rule)
 {
     this.valid = valid;
 }