//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void testPasswordPolicyConfiguration() public virtual void testPasswordPolicyConfiguration() { PasswordPolicy policy = processEngineConfiguration.PasswordPolicy; assertThat(policy.GetType().IsAssignableFrom(typeof(DefaultPasswordPolicyImpl)), @is(true)); assertThat(policy.Rules.Count, @is(5)); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldGetPasswordPolicy() public virtual void shouldGetPasswordPolicy() { // given // then PasswordPolicy passwordPolicy = identityService.PasswordPolicy; // when assertThat(passwordPolicy, notNullValue()); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldGetPolicy() public virtual void shouldGetPolicy() { when(processEngineConfigurationMock.EnablePasswordPolicy).thenReturn(true); PasswordPolicy passwordPolicyMock = mock(typeof(PasswordPolicy)); when(identityServiceMock.PasswordPolicy).thenReturn(passwordPolicyMock); when(passwordPolicyMock.Rules).thenReturn(Collections.singletonList <PasswordPolicyRule>(new PasswordPolicyDigitRuleImpl(1))); given().then().expect().statusCode(Status.OK.StatusCode).body("rules[0].placeholder", equalTo("PASSWORD_POLICY_DIGIT")).body("rules[0].parameter.minDigit", equalTo("1")).when().get(QUERY_URL); }