@Test public void testRefreshView() { final PMMLIncludedModelActiveRecord includedModel = mock(PMMLIncludedModelActiveRecord.class); final String path = "/bla/bla/bla/111111111111111222222222222222333333333333333444444444444444/file.dmn"; final int modelCount = 12; when(includedModel.getNamespace()).thenReturn(path); when(includedModel.getModelCount()).thenReturn(modelCount); doReturn(includedModel).when(card).getIncludedModel(); card.refreshView(); verify(cardView).setPath("...111111222222222222222333333333333333444444444444444/file.dmn"); verify(cardView).setModelCount(modelCount); }
protected void refreshView() { contentView.setPath(getTruncatedSubTitle()); contentView.setModelCount(getModelCount()); }
PMMLCardComponent extends BaseCardComponent<PMMLIncludedModelActiveRecord, PMMLCardComponent.ContentView> { protected void refreshView() { contentView.setPath(getTruncatedSubTitle()); contentView.setModelCount(getModelCount()); } }
PMMLCardComponent extends BaseCardComponent<PMMLIncludedModelActiveRecord, PMMLCardComponent.ContentView> { protected void refreshView() { contentView.setPath(getTruncatedSubTitle()); contentView.setModelCount(getModelCount()); } @Inject  PMMLCardComponent(final @PMMLCard PMMLCardComponent.ContentView contentView,
                             final Event<RefreshDecisionComponents> refreshDecisionComponentsEvent); }
PMMLCardComponent extends BaseCardComponent<PMMLIncludedModelActiveRecord, PMMLCardComponent.ContentView> { protected void refreshView() { contentView.setPath(getTruncatedSubTitle()); contentView.setModelCount(getModelCount()); } @Inject  PMMLCardComponent(final @PMMLCard PMMLCardComponent.ContentView contentView,
                             final Event<RefreshDecisionComponents> refreshDecisionComponentsEvent); @PostConstruct void init(); }
PMMLCardComponent extends BaseCardComponent<PMMLIncludedModelActiveRecord, PMMLCardComponent.ContentView> { protected void refreshView() { contentView.setPath(getTruncatedSubTitle()); contentView.setModelCount(getModelCount()); } @Inject  PMMLCardComponent(final @PMMLCard PMMLCardComponent.ContentView contentView,
                             final Event<RefreshDecisionComponents> refreshDecisionComponentsEvent); @PostConstruct void init();  }