Example #1
0
 @Before
 public void initTestObjects() throws Exception {
   given(brjs).hasBeenCreated();
   app = brjs.app("app1");
   aspectTemplate = brjs.template("aspect");
   aspect = app.aspect("default");
   badAspect = app.aspect("!#*");
 }
Example #2
0
 @Before
 public void initTestObjects() throws Exception {
   given(brjs)
       .automaticallyFindsBundlerPlugins()
       .and(brjs)
       .automaticallyFindsMinifierPlugins()
       .and(brjs)
       .hasBeenCreated();
   app = brjs.app("app1");
   aspectTemplate = brjs.sdkTemplateGroup("default").template("aspect");
   aspect = app.aspect("default");
   badAspect = app.aspect("!#*");
   defaultBladeset = app.defaultBladeset();
   bladeInDefaultBladeset = defaultBladeset.blade("b1");
 }
Example #3
0
 @Before
 public void initTestObjects() throws Exception {
   given(brjs)
       .automaticallyFindsBundlers()
       .and(brjs)
       .automaticallyFindsMinifiers()
       .and(brjs)
       .hasBeenCreated();
   app = brjs.app("app1");
   aspect = app.aspect("default");
   bladeset = app.bladeset("bs");
   blade = bladeset.blade("b1");
 }
Example #4
0
 @Before
 public void initTestObjects() throws Exception {
   given(brjs)
       .automaticallyFindsAssetLocationPlugins()
       .and(brjs)
       .automaticallyFindsAssetPlugins()
       .and(brjs)
       .automaticallyFindsContentPlugins()
       .and(brjs)
       .hasTagHandlerPlugins(
           new MockTagHandler("tagToken", "dev replacement", "prod replacement", false),
           new MockTagHandler("localeToken", "", "", true))
       .and(brjs)
       .hasContentPlugins(new MockContentPlugin())
       .and(brjs)
       .hasContentPlugins(new AppMetadataContentPlugin())
       .and(brjs)
       .hasBeenCreated();
   app = brjs.app("app1");
   defaultAspect = app.aspect("default");
   alternateAspect = app.aspect("alternate");
   workbench = app.bladeset("bs").blade("b1").workbench();
 }
Example #5
0
 @Test
 public void multipleAspectsAreDiscoveredWhenThereAreOtherDirectories() throws Exception {
   given(app)
       .hasBeenCreated()
       .and(app)
       .hasDir("a-folder")
       .and(app)
       .hasDir("another-aspect")
       .and(app)
       .hasDir("default-aspect")
       .and(app)
       .hasDir("aspect1-aspect")
       .and(app)
       .hasDir("aspect2-aspect")
       .and(app)
       .hasDir("some-other-folder");
   /* then */ assertEquals(
       Arrays.asList(
           app.aspect("default"),
           app.aspect("another"),
           app.aspect("aspect1"),
           app.aspect("aspect2")),
       app.aspects());
 }
Example #6
0
 @Test
 public void aspectsCannotHaveTheSameFormatAsLanguageAndCountryLocale() throws Exception {
   then((NamedNode) app.aspect("my_AS")).nameIsInvalid();
 }