@Test public void testShowView_WithViewComponent() { setUpApplicationLayout(); assertThat(applicationLayout.getComponentCount(), is(3)); assertThat(applicationLayout.getComponent(1), is(instanceOf(EmptyView.class))); View view = mock(View.class); Component component = mock(Component.class); when(view.getViewComponent()).thenReturn(component); applicationLayout.showView(view); assertThat(applicationLayout.getComponentCount(), is(3)); assertThat(applicationLayout.getComponent(1), is(component)); }
@Override public void showView(View view) { setMainArea(view.getViewComponent()); }
ApplicationLayout extends VerticalLayout implements ViewDisplay { @Override public void showView(View view) { setMainArea(view.getViewComponent()); } }
ApplicationLayout extends VerticalLayout implements ViewDisplay { @Override public void showView(View view) { setMainArea(view.getViewComponent()); } ApplicationLayout(ApplicationHeader header, @CheckForNull ApplicationFooter footer); }
ApplicationLayout extends VerticalLayout implements ViewDisplay { @Override public void showView(View view) { setMainArea(view.getViewComponent()); } ApplicationLayout(ApplicationHeader header, @CheckForNull ApplicationFooter footer); @Override void showView(View view); }
ApplicationLayout extends VerticalLayout implements ViewDisplay { @Override public void showView(View view) { setMainArea(view.getViewComponent()); } ApplicationLayout(ApplicationHeader header, @CheckForNull ApplicationFooter footer); @Override void showView(View view);  }