Esempio n. 1
0
 @Before
 public void initTestObjects() throws Exception {
   given(brjs).hasCommandPlugins(new CreateBladeCommand()).and(brjs).hasBeenCreated();
   app = brjs.app("app");
   bladeset = app.bladeset("bladeset");
   blade = bladeset.blade("blade");
   badBlade = bladeset.blade("!$%$^");
   blade1InDefaultBladeset = app.defaultBladeset().blade("blade1");
   blade2InDefaultBladeset = app.defaultBladeset().blade("blade2");
   angularTemplates = brjs.sdkTemplateGroup("angular");
   defaultTemplates = brjs.sdkTemplateGroup("default");
   myTemplateTemplates = brjs.sdkTemplateGroup("myTemplate");
 }
Esempio n. 2
0
 @Test
 public void exceptionIsThrownIfTheBladesetDoesntExist() throws Exception {
   given(app).hasBeenCreated();
   when(brjs).runCommand("create-blade", "app", "bladeset", "blade");
   then(exceptions)
       .verifyException(
           NodeDoesNotExistException.class,
           "bladeset",
           unquoted(bladeset.getClass().getSimpleName()))
       .whereTopLevelExceptionIs(CommandArgumentsException.class);
 }