Package org.bladerunnerjs.testing.utility

Examples of org.bladerunnerjs.testing.utility.ScriptedRequestGeneratingTagHandlerPlugin


  public void onlyUrlsIdentifiedByACorrespondingTagHandlerAreIncludedInTheBuiltApp() throws Exception {
   
    given(brjs).hasNotYetBeenCreated()
      .and(brjs).automaticallyFindsBundlerPlugins()
      .and(brjs).hasContentPlugins( new ScriptedContentPlugin(false, "/used/url", "/unused/url") )
      .and(brjs).hasTagHandlerPlugins( new ScriptedRequestGeneratingTagHandlerPlugin("tag", Arrays.asList("ScriptedContentPlugin"), Arrays.asList("/used/url")) )
      .and(brjs).hasBeenCreated()
      .and( brjs.app("app1").defaultAspect() ).indexPageHasContent("<@tag @/>")
      .and(brjs).localeForwarderHasContents("")
      .and( brjs.app("app1") ).hasBeenBuilt(targetDir);
    then(targetDir).containsFile("used/url")
View Full Code Here


  @Test
  public void allUrlsAreIncludedInTheBuiltAppIfACorrespondingTagHandlerPluginIsNotFound() throws Exception {
    given(brjs).hasNotYetBeenCreated()
        .and(brjs).automaticallyFindsBundlerPlugins()
        .and(brjs).hasContentPlugins( new ScriptedContentPlugin(false, "/used/url", "/unused/url") )
        .and(brjs).hasTagHandlerPlugins( new ScriptedRequestGeneratingTagHandlerPlugin("tag", Arrays.asList(), Arrays.asList("/used/url")) )
        .and(brjs).hasBeenCreated()
        .and( brjs.app("app1").defaultAspect() ).indexPageHasContent("<@tag @/>")
        .and(brjs).localeForwarderHasContents("")
        .and( brjs.app("app1") ).hasBeenBuilt(targetDir);
      then(targetDir).containsFile("used/url")
View Full Code Here

  @Test
  public void urlsOnlyHaveToBeIdentifiedByASingleTagHandlerIfMultipleCanSupportTheSameContentPlugin() throws Exception {
    given(brjs).hasNotYetBeenCreated()
        .and(brjs).automaticallyFindsBundlerPlugins()
        .and(brjs).hasContentPlugins( new ScriptedContentPlugin(false, "/used/url", "/unused/url") )
        .and(brjs).hasTagHandlerPlugins( new ScriptedRequestGeneratingTagHandlerPlugin("tag1", Arrays.asList("ScriptedContentPlugin"), Arrays.asList()),
                        new ScriptedRequestGeneratingTagHandlerPlugin("tag2", Arrays.asList("ScriptedContentPlugin"), Arrays.asList("/used/url")) )
        .and(brjs).hasBeenCreated()
        .and( brjs.app("app1").defaultAspect() ).indexPageHasContent("<@tag1 @/> <@tag2 @/>")
        .and(brjs).localeForwarderHasContents("")
        .and( brjs.app("app1") ).hasBeenBuilt(targetDir);
      then(targetDir).containsFile("used/url")
View Full Code Here

  @Test
  public void contentPluginsIdentifiedByATagHandlerAreNotIncludedInTheBuiltAppIfTheTagIsntUsed() throws Exception {
    given(brjs).hasNotYetBeenCreated()
        .and(brjs).automaticallyFindsBundlerPlugins()
        .and(brjs).hasContentPlugins( new ScriptedContentPlugin(false, "/used/url", "/unused/url") )
        .and(brjs).hasTagHandlerPlugins( new ScriptedRequestGeneratingTagHandlerPlugin("tag", Arrays.asList("ScriptedContentPlugin"), Arrays.asList("/used/url")) )
        .and(brjs).hasBeenCreated()
        .and( brjs.app("app1").defaultAspect() ).indexPageHasContent("")
        .and(brjs).localeForwarderHasContents("")
        .and( brjs.app("app1") ).hasBeenBuilt(targetDir);
      then(targetDir).doesNotContainFile("used/url")
View Full Code Here

  @Test
  public void contentUrlsUsedInOtherAspectsAreStillContainedInTheBuiltApp() throws Exception {
    given(brjs).hasNotYetBeenCreated()
        .and(brjs).automaticallyFindsBundlerPlugins()
        .and(brjs).hasContentPlugins( new ScriptedContentPlugin(false, "/used/url", "/unused/url") )
        .and(brjs).hasTagHandlerPlugins( new ScriptedRequestGeneratingTagHandlerPlugin("tag", Arrays.asList("ScriptedContentPlugin"), Arrays.asList("/used/url")) )
        .and(brjs).hasBeenCreated()
        .and( brjs.app("app1").aspect("empty") ).indexPageHasContent("")
        .and( brjs.app("app1").aspect("nonempty") ).indexPageHasContent("<@tag @/>")
        .and(brjs).localeForwarderHasContents("")
        .and( brjs.app("app1") ).hasBeenBuilt(targetDir);
View Full Code Here

TOP

Related Classes of org.bladerunnerjs.testing.utility.ScriptedRequestGeneratingTagHandlerPlugin

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.