ilgrosso commented on code in PR #1606:
URL: https://github.com/apache/syncope/pull/1606#discussion_r4512910097
##########
core/spring/src/test/java/org/apache/syncope/core/spring/security/PasswordGeneratorTest.java:
##########
@@ -149,4 +151,19 @@ public void issueSYNCOPE678() {
password = passwordGenerator.generate(List.of(new
TestPasswordPolicy(passwordRule)));
assertNotNull(password);
}
+
+
+ private static DefaultPasswordRuleConf configRule(final boolean
usernameAllowed) {
+ DefaultPasswordRuleConf conf = new DefaultPasswordRuleConf();
+ conf.setUsernameAllowed(usernameAllowed);
+ return conf;
+ }
+
+ @Test
Review Comment:
You might want to add a couple more tests to check what happens with all
possible combinations. e.g.
```java
rules.add(configRule(true));
rules.add(configRule(true));
```
```java
rules.add(configRule(true));
rules.add(configRule(false));
```
```java
rules.add(configRule(false));
rules.add(configRule(true));
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]