Esempio n. 1
0
 @Test
 public void invalidAspectNameSpaceThrowsException() throws Exception {
   when(badAspect).create();
   then(logging)
       .errorMessageReceived(
           AbstractNode.Messages.NODE_CREATION_FAILED_LOG_MSG, "Aspect", badAspect.dir())
       .and(exceptions)
       .verifyException(InvalidDirectoryNameException.class, badAspect.dir(), unquoted("'!#*'"));
 }
Esempio n. 2
0
 @Test
 public void populatingAnAspectCausesRootObserversToBeNotified() throws Exception {
   given(observer).observing(brjs);
   when(aspect).populate();
   then(observer)
       .notified(NodeReadyEvent.class, aspect)
       .and(observer)
       .notified(NodeReadyEvent.class, aspect.theme("standard"));
 }
Esempio n. 3
0
 @Test
 public void parentGivesTheCorrectNode() throws Exception {
   when(aspect).create();
   then(aspect.parent()).isSameAs(app);
 }