AbstractHandlerMethodMapping refactoring
Remove convenience Map that is to avoid. The only downside is that getHandlerMethods requires a transformation but that should not be used frequently. See gh-22961
This commit is contained in:
@@ -112,8 +112,7 @@ public class HandlerMethodMappingTests {
|
||||
this.mapping.registerMapping(key1, this.handler, this.method1);
|
||||
this.mapping.registerMapping(key2, this.handler, this.method2);
|
||||
|
||||
assertThat(this.mapping.getMappingRegistry().getMappings())
|
||||
.containsKeys(key1, key2);
|
||||
assertThat(this.mapping.getMappingRegistry().getRegistrations()).containsKeys(key1, key2);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -125,8 +124,7 @@ public class HandlerMethodMappingTests {
|
||||
this.mapping.registerMapping(key1, handler1, this.method1);
|
||||
this.mapping.registerMapping(key2, handler2, this.method1);
|
||||
|
||||
assertThat(this.mapping.getMappingRegistry().getMappings())
|
||||
.containsKeys(key1, key2);
|
||||
assertThat(this.mapping.getMappingRegistry().getRegistrations()).containsKeys(key1, key2);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -141,7 +139,7 @@ public class HandlerMethodMappingTests {
|
||||
result = this.mapping.getHandler(MockServerWebExchange.from(MockServerHttpRequest.get(key)));
|
||||
|
||||
assertThat(result.block()).isNull();
|
||||
assertThat(this.mapping.getMappingRegistry().getMappings().keySet()).doesNotContain(key);
|
||||
assertThat(this.mapping.getMappingRegistry().getRegistrations().keySet()).doesNotContain(key);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user