@Test @SuppressWarnings("unchecked") public void testRefreshCurrentSessionFormsByDomain() { ClientSession session = mock(ClientSession.class); CanvasHandler handler = mock(CanvasHandler.class); Diagram diagram = mock(Diagram.class); Metadata metadata = mock(Metadata.class); when(sessionManager.getCurrentSession()).thenReturn(session); when(session.getCanvasHandler()).thenReturn(handler); when(handler.getDiagram()).thenReturn(diagram); when(diagram.getMetadata()).thenReturn(metadata); when(metadata.getDefinitionSetId()).thenReturn(BindableAdapterUtils.getDefinitionSetId(SomeDomain.class)); tested.refreshCurrentSessionForms(SomeDomain.class); ArgumentCaptor<RefreshFormPropertiesEvent> eventCaptor = ArgumentCaptor.forClass(RefreshFormPropertiesEvent.class); verify(refreshFormsEvent, times(1)).fire(eventCaptor.capture()); RefreshFormPropertiesEvent event = eventCaptor.getValue(); assertEquals(session, event.getSession()); assertNull(event.getUuid()); }
public void refreshCurrentSessionForms() { refreshCurrentSessionForms(null); }
StunnerFormsHandler { public void refreshCurrentSessionForms() { refreshCurrentSessionForms(null); } }
StunnerFormsHandler { public void refreshCurrentSessionForms() { refreshCurrentSessionForms(null); } StunnerFormsHandler(); @Inject  StunnerFormsHandler(final SessionManager sessionManager,
                               final Event<RefreshFormPropertiesEvent> refreshFormsEvent); }
StunnerFormsHandler { public void refreshCurrentSessionForms() { refreshCurrentSessionForms(null); } StunnerFormsHandler(); @Inject  StunnerFormsHandler(final SessionManager sessionManager,
                               final Event<RefreshFormPropertiesEvent> refreshFormsEvent); void refreshCurrentSessionForms(); void refreshCurrentSessionForms(final Class<?> defSetType); }
StunnerFormsHandler { public void refreshCurrentSessionForms() { refreshCurrentSessionForms(null); } StunnerFormsHandler(); @Inject  StunnerFormsHandler(final SessionManager sessionManager,
                               final Event<RefreshFormPropertiesEvent> refreshFormsEvent); void refreshCurrentSessionForms(); void refreshCurrentSessionForms(final Class<?> defSetType);  }