Exemplo n.º 1
0
 @Test
 public void detachNoScope() {
   // given
   prepAttach();
   ui.attach();
   // when
   ui.detach();
   // then
   // no exception
 }
Exemplo n.º 2
0
 @Test
 public void detachScopeNotNull() {
   // given
   prepAttach();
   ui.attach();
   ui.setScope(uiScope);
   ui.setInstanceKey(uiKey);
   // when
   ui.detach();
   // then
   verify(uiScope).releaseScope(ui.getInstanceKey());
   verify(broadcaster).unregister(Broadcaster.ALL_MESSAGES, ui);
 }