Пример #1
0
 @Test(expected = ConfigurationException.class)
 public void changeView_RootComponentNotSet() {
   // given
   when(toView.getRootComponent()).thenReturn(null);
   when(toView.getName()).thenReturn("toView");
   // when
   ui.changeView(toView);
   // then
 }
Пример #2
0
 @Test
 public void changeView() {
   // given
   when(toView.getRootComponent()).thenReturn(viewContent);
   when(toView.getName()).thenReturn("toView");
   // when
   ui.changeView(toView);
   // then
   verify(toView).getRootComponent();
   verify(translator).translate(toView);
   verify(viewContent).setSizeFull();
   assertThat(ui.getViewDisplayPanel().getContent()).isEqualTo(viewContent);
 }