Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mercyblitz committed Jan 10, 2025
1 parent 57f8367 commit 73814f3
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ public void test() throws Exception {
*/
@EventListener(WebEndpointMappingsReadyEvent.class)
public void onWebEndpointMappingsReadyEvent(WebEndpointMappingsReadyEvent event) {
assertTrue(publishEvents);

// Only TestController
Collection<WebEndpointMapping> mappings = event.getMappings();
assertEquals(1, mappings.size());
Expand All @@ -137,6 +139,8 @@ public void onWebEndpointMappingsReadyEvent(WebEndpointMappingsReadyEvent event)
*/
@EventListener(HandlerMethodArgumentsResolvedEvent.class)
public void onHandlerMethodArgumentsResolvedEvent(HandlerMethodArgumentsResolvedEvent event) {
assertTrue(publishEvents);

Method method = event.getMethod();
assertEquals("echo", method.getName());
assertEquals(String.class, method.getReturnType());
Expand All @@ -156,5 +160,6 @@ public void onHandlerMethodArgumentsResolvedEvent(HandlerMethodArgumentsResolved
Object[] arguments = event.getArguments();
assertEquals(1, arguments.length);
assertEquals("hello", arguments[0]);

}
}

0 comments on commit 73814f3

Please sign in to comment.