Esempio n. 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
 }
Esempio n. 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);
 }