@Before public void init() throws Exception { super.init(); displayerCoordinator = new DisplayerCoordinator(rendererManager); displayerCoordinator.addListener(displayerListener); doAnswer(new Answer() { public Object answer(InvocationOnMock invocationOnMock) throws Throwable { return initDisplayer(new MetricDisplayer(mock(MetricDisplayer.View.class)), null); } }).when(dashboardFactory).createMetricDisplayer(); doAnswer(new Answer() { public Object answer(InvocationOnMock invocationOnMock) throws Throwable { return initDisplayer(new TableDisplayer(mock(TableDisplayer.View.class)), null); } }).when(dashboardFactory).createTableDisplayer(); i18n = mock(DashboardI18n.class, new Answer() { @Override public Object answer(InvocationOnMock invocation) throws Throwable { return invocation.getMethod().getName() + Arrays.deepToString(invocation.getArguments()); } }); when(getView().getI18nService()).thenReturn(i18n); registerDataset(); }
@Before public void init() throws Exception { super.init(); displayerCoordinator = new DisplayerCoordinator(rendererManager); displayerCoordinator.addListener(displayerListener); i18n = mock(DashboardI18n.class, new Answer() { @Override public Object answer(InvocationOnMock invocation) throws Throwable { return invocation.getMethod().getName() + Arrays.deepToString(invocation.getArguments()); } }); when(getView().getI18nService()).thenReturn(i18n); registerDataset(); }
@Before public void init() throws Exception { super.init(); displayerCoordinator = new DisplayerCoordinator(rendererManager); displayerCoordinator.addListener(displayerListener); i18n = mock(DashboardI18n.class, new Answer() { @Override public Object answer(InvocationOnMock invocation) throws Throwable { return invocation.getMethod().getName() + Arrays.deepToString(invocation.getArguments()); } }); when(getView().getI18nService()).thenReturn(i18n); registerDataset(); }