@Nonnull public static PresentationModelMatcher presentationModel() { return new PresentationModelMatcher(); }
/******************************************************************************************************************* * ******************************************************************************************************************/ @Test public void when_a_Site_has_been_opened_must_properly_populate_the_presentation_and_publish_an_empty_selection() throws IOException { // given reset(messageBus); // when underTest.onOpenSite(openSiteEvent); // then verify(presentation).populate(argThat(presentationModel().withRole(Selectable.class))); verify(presentation).expandFirstLevel(); verifyNoMoreInteractions(presentation); verify(messageBus).publish(emptyEvent()); verifyNoMoreInteractions(messageBus); } }
/******************************************************************************************************************* * ******************************************************************************************************************/ @Test public void when_a_Site_has_been_opened_must_properly_populate_the_presentation_and_publish_an_empty_selection() throws IOException { // given reset(messageBus); // when underTest.onOpenSite(openSiteEvent); // then verify(presentation).populate(argThat(presentationModel().withRole(Selectable.class))); verify(presentation).expandFirstLevel(); verifyNoMoreInteractions(presentation); verify(messageBus).publish(emptySelectionEvent()); verifyNoMoreInteractions(messageBus); } }