1
0
mirror of synced 2026-08-05 17:57:15 +00:00

Replace Streams with Loops

First version of replacing streams

fix wwwAuthenticate and codestyle

fix errors in implementation to pass tests

Fix review notes

Remove uneccessary final to align with cb

Short circuit way to authorize

Simplify error message, make code readably

Return error while duplicate key found

Delete check for duplicate, checkstyle issues

Return duplicate error

Fixes gh-7154
This commit is contained in:
kostya05983
2019-08-04 17:11:24 +07:00
committed by Josh Cummings
parent d6d0d89ff8
commit f6c650db47
30 changed files with 283 additions and 184 deletions
@@ -46,6 +46,13 @@ public class MapReactiveUserDetailsServiceTests {
new MapReactiveUserDetailsService(users);
}
@Test
public void constructorCaseIntensiveKey() {
UserDetails userDetails = User.withUsername("USER").password("password").roles("USER").build();
MapReactiveUserDetailsService userDetailsService = new MapReactiveUserDetailsService(userDetails);
assertThat(userDetailsService.findByUsername("user").block()).isEqualTo(userDetails);
}
@Test
public void findByUsernameWhenFoundThenReturns() {
assertThat((users.findByUsername(USER_DETAILS.getUsername()).block())).isEqualTo(USER_DETAILS);