Skip to content

Commit cd8c825

Browse files
mehdimaaref7clement-dufaure
authored andcommitted
[ENH] ✨ Clean unnecessary lines in Ldap-utils
Signed-off-by: Mehdi Maaref <mehdimaaref@live.fr>
1 parent d45e20e commit cd8c825

4 files changed

Lines changed: 20 additions & 567 deletions

File tree

sugoi-api-ldap-store-provider/src/test/java/fr/insee/sugoi/ldap/LdapWriterStoreTest.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,8 @@ public Realm realm() {
114114
PostalAddress addressOrga;
115115
PostalAddress addressToto;
116116

117-
@Bean(name = "Realm")
118117
@BeforeEach
119118
public void setup() {
120-
121119
ldapWriterStore = (LdapWriterStore) context.getBean("LdapWriterStore", realm(), userStorage());
122120
ldapReaderStore = (LdapReaderStore) context.getBean("LdapReaderStore", realm(), userStorage());
123121
addressOrga = new PostalAddress();
@@ -257,8 +255,11 @@ public void testDeleteUser() {
257255
.anyMatch(user -> user.getUsername().equalsIgnoreCase("byebye")));
258256
assertThat(
259257
"byebye is in Utilisateurs_Applitest",
260-
ldapReaderStore.getUsersInGroup("Applitest", "Utilisateurs_Applitest").getResults().stream()
261-
.noneMatch(user -> user.getUsername().equalsIgnoreCase("byebye")));
258+
!ldapReaderStore
259+
.getUsersInGroup("Applitest", "Utilisateurs_Applitest")
260+
.getResults()
261+
.stream()
262+
.anyMatch(user -> user.getUsername().equalsIgnoreCase("byebye")));
262263
}
263264

264265
@Test

0 commit comments

Comments
 (0)