@Test public void postProcessAfterInitialization_2Methods_EventsExecuted() { proc.postProcessAfterInitialization(new StringListener2(verifier), "bean"); eventRegistry.fire("event"); verify(verifier).eventHandled("observeString1"); verify(verifier).eventHandled("observeString2"); }
@Test(expected = IllegalStateException.class) public void postProcessAfterInitialization_1AnnotatedVarArgsParameter_ThrowsException() { proc.postProcessAfterInitialization( new Object() { void observeString1(@Observes String... param1) {} }, getClass().getName()); eventRegistry.fire("varargs"); }
@Test(expected = IllegalStateException.class) public void postProcessAfterInitialization_2AnnotatedMethodParameters_ThrowsException() { proc.postProcessAfterInitialization( new Object() { void observeString1(@Observes String param1, @Observes String param2) {} }, getClass().getName()); eventRegistry.fire("event"); }