Search in sources :

Example 1 with ProjectMetricsFactory

use of org.kie.workbench.common.screens.library.client.util.ProjectMetricsFactory in project kie-wb-common by kiegroup.

the class ProjectMetricsScreenTest method init.

@Before
public void init() throws Exception {
    super.init();
    when(project.getRepository()).thenReturn(repository);
    when(repository.getAlias()).thenReturn("repo");
    when(project.getName()).thenReturn("project1");
    contributorsDataSet = ContributorsData.INSTANCE.toDataSet();
    contributorsDataSet.setUUID(ContributorsDataSets.GIT_CONTRIB);
    clientDataSetManager.registerDataSet(contributorsDataSet);
    displayerCoordinator = new DisplayerCoordinator(rendererManager);
    displayerCoordinator.addListener(displayerListener);
    metricsFactory = new ProjectMetricsFactory(i18n, displayerLocator);
    presenter = new ProjectMetricsScreen(view, i18n, metricsFactory, displayerCoordinator);
    presenter.onStartup(new WorkbenchProjectMetricsEvent(project));
}
Also used : DisplayerCoordinator(org.dashbuilder.displayer.client.DisplayerCoordinator) WorkbenchProjectMetricsEvent(org.kie.workbench.common.screens.library.client.events.WorkbenchProjectMetricsEvent) ProjectMetricsFactory(org.kie.workbench.common.screens.library.client.util.ProjectMetricsFactory) Before(org.junit.Before)

Aggregations

DisplayerCoordinator (org.dashbuilder.displayer.client.DisplayerCoordinator)1 Before (org.junit.Before)1 WorkbenchProjectMetricsEvent (org.kie.workbench.common.screens.library.client.events.WorkbenchProjectMetricsEvent)1 ProjectMetricsFactory (org.kie.workbench.common.screens.library.client.util.ProjectMetricsFactory)1