Package org.apache.wicket.markup.head

Examples of org.apache.wicket.markup.head.HeaderItem


   * bundle {a, b->a}, render [a], should render [ab]
   */
  @Test
  public void testBundle()
  {
    HeaderItem bundleAB = Application.get()
      .getResourceBundles()
      .addJavaScriptBundle(Application.class, "ab.js", new ResourceReferenceA(),
        new ResourceReferenceB());
    aggregator.render(forReference(new ResourceReferenceA()));
    assertItems(bundleAB);
View Full Code Here


   * bundle {a, b->a}, render [b], should render [ab]
   */
  @Test
  public void testBundleRenderingOther()
  {
    HeaderItem bundleAB = Application.get()
      .getResourceBundles()
      .addJavaScriptBundle(Application.class, "ab.js", new ResourceReferenceA(),
        new ResourceReferenceB());
    aggregator.render(forReference(new ResourceReferenceB()));
    assertItems(bundleAB);
View Full Code Here

   * bundle {a, b->a}, render [a, b], should render [ab]
   */
  @Test
  public void testBundleRenderingBoth()
  {
    HeaderItem bundleAB = Application.get()
      .getResourceBundles()
      .addJavaScriptBundle(Application.class, "ab.js", new ResourceReferenceA(),
        new ResourceReferenceB());
    aggregator.render(forReference(new ResourceReferenceA()));
    aggregator.render(forReference(new ResourceReferenceB()));
View Full Code Here

   * bundle {a, b->a}, render [d->c->a], should render [ab, c, d]
   */
  @Test
  public void testBundleRenderedAsDependency()
  {
    HeaderItem bundleAB = Application.get()
      .getResourceBundles()
      .addJavaScriptBundle(Application.class, "ab.js", new ResourceReferenceA(),
        new ResourceReferenceB());
    aggregator.render(forReference(new ResourceReferenceD()));
    assertItems(bundleAB, forReference(new ResourceReferenceC()),
View Full Code Here

   * bundle {c->a, d->c->a}, render [d], should render [a, cd]
   */
  @Test
  public void testBundleWithDependencies()
  {
    HeaderItem bundleCD = Application.get()
      .getResourceBundles()
      .addJavaScriptBundle(Application.class, "cd.js", new ResourceReferenceC(),
        new ResourceReferenceD());
    aggregator.render(forReference(new ResourceReferenceD()));
    assertItems(forReference(new ResourceReferenceA()), bundleCD);
View Full Code Here

   * bundle {a, b->a} and {c->a, d->c->a}, render [d], should render [ab, cd]
   */
  @Test
  public void testTwoBundlesWithDependencies()
  {
    HeaderItem bundleAB = Application.get()
      .getResourceBundles()
      .addJavaScriptBundle(Application.class, "ab.js", new ResourceReferenceA(),
        new ResourceReferenceB());
    HeaderItem bundleCD = Application.get()
      .getResourceBundles()
      .addJavaScriptBundle(Application.class, "cd.js", new ResourceReferenceC(),
        new ResourceReferenceD());
    aggregator.render(forReference(new ResourceReferenceD()));
    assertItems(bundleAB, bundleCD);
View Full Code Here

   * bundle {a, b->a} and {c->a, d->c->a}, render [priority(b), d], should render [ab, cd]
   */
  @Test
  public void testTwoBundlesWithDependenciesAndPriority()
  {
    HeaderItem bundleAB = Application.get()
      .getResourceBundles()
      .addJavaScriptBundle(Application.class, "ab.js", new ResourceReferenceA(),
        new ResourceReferenceB());
    HeaderItem bundleCD = Application.get()
      .getResourceBundles()
      .addJavaScriptBundle(Application.class, "cd.js", new ResourceReferenceC(),
        new ResourceReferenceD());
    aggregator.render(new PriorityHeaderItem(forReference(new ResourceReferenceB())));
    aggregator.render(forReference(new ResourceReferenceD()));
View Full Code Here

   * bundle {bun1 -> x, bun2 -> y}, render [bun1], should render [x, y, bun12]
   */
  @Test
  public void testTwoResourcesWithBundleAsDependency()
  {
    HeaderItem bundle12 = Application.get()
      .getResourceBundles()
      .addJavaScriptBundle(Application.class, "bun12.js", new ResourceReferenceBun1(),
        new ResourceReferenceBun2());
    aggregator.render(forReference(new ResourceReferenceBun1()));
    assertItems(forReference(new ResourceReferenceX()), forReference(new ResourceReferenceY()),
View Full Code Here

   * bundle {a, b->a}, render [a], should render [ab]
   */
  @Test
  public void testBundle()
  {
    HeaderItem bundleAB = Application.get()
      .getResourceBundles()
      .addJavaScriptBundle(Application.class, "ab.js", new ResourceReferenceA(),
        new ResourceReferenceB());
    aggregator.render(forReference(new ResourceReferenceA()));
    assertItems(bundleAB);
View Full Code Here

   * bundle {a, b->a}, render [b], should render [ab]
   */
  @Test
  public void testBundleRenderingOther()
  {
    HeaderItem bundleAB = Application.get()
      .getResourceBundles()
      .addJavaScriptBundle(Application.class, "ab.js", new ResourceReferenceA(),
        new ResourceReferenceB());
    aggregator.render(forReference(new ResourceReferenceB()));
    assertItems(bundleAB);
View Full Code Here

TOP

Related Classes of org.apache.wicket.markup.head.HeaderItem

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.