@Test @SuppressWarnings("unchecked") public void testRefreshCurrentSessionFormsByNotMatchingDomain() { 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("ds1"); tested.refreshCurrentSessionForms(SomeDomain.class); verify(refreshFormsEvent, never()).fire(any(RefreshFormPropertiesEvent.class)); }
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);  }