Examples of ContainerConfig


Examples of org.apache.shindig.config.ContainerConfig

  private static final Uri GADGET_URI = Uri.parse("http://example.com/gadget.xml");

  // makeJsUri tests
  @Test(expected = RuntimeException.class)
  public void makeMissingHostConfig() {
    ContainerConfig config = mockConfig(null, "/gadgets/js");
    DefaultJsUriManager manager = makeManager(config, null);
    Gadget gadget = mockGadget(false, false);
    manager.makeExternJsUri(gadget, null);
  }
View Full Code Here

Examples of org.apache.shindig.config.ContainerConfig

    manager.makeExternJsUri(gadget, null);
  }

  @Test(expected = RuntimeException.class)
  public void makeMissingPathConfig() {
    ContainerConfig config = mockConfig("foo", null);
    DefaultJsUriManager manager = makeManager(config, null);
    Gadget gadget = mockGadget(false, false);
    manager.makeExternJsUri(gadget, null);
  }
View Full Code Here

Examples of org.apache.shindig.config.ContainerConfig

    manager.makeExternJsUri(gadget, null);
  }

  @Test
  public void makeJsUriNoPathSlashNoVersion() {
    ContainerConfig config = mockConfig("http://www.js.org", "/gadgets/js/");
    TestDefaultJsUriManager manager = makeManager(config, null);
    Gadget gadget = mockGadget(false, false);
    List<String> extern = Lists.newArrayList("feature");
    Uri jsUri = manager.makeExternJsUri(gadget, extern);
    assertFalse(manager.hadError());
View Full Code Here

Examples of org.apache.shindig.config.ContainerConfig

    assertEquals("0", jsUri.getQueryParameter(Param.CONTAINER_MODE.getKey()));
  }

  @Test
  public void makeJsUriAddPathSlashNoVersion() {
    ContainerConfig config = mockConfig("http://www.js.org", "/gadgets/js");
    TestDefaultJsUriManager manager = makeManager(config, null);
    Gadget gadget = mockGadget(false, false);
    List<String> extern = Lists.newArrayList("feature");
    Uri jsUri = manager.makeExternJsUri(gadget, extern);
    assertFalse(manager.hadError());
View Full Code Here

Examples of org.apache.shindig.config.ContainerConfig

    assertEquals("0", jsUri.getQueryParameter(Param.CONTAINER_MODE.getKey()));
  }

  @Test
  public void makeJsUriAddPathSlashVersioned() {
    ContainerConfig config = mockConfig("http://www.js.org", "/gadgets/js");
    Gadget gadget = mockGadget(false, false);
    List<String> extern = Lists.newArrayList("feature");
    String version = "verstring";
    Versioner versioner = this.mockVersioner(extern, version, version);
    TestDefaultJsUriManager manager = makeManager(config, versioner);
View Full Code Here

Examples of org.apache.shindig.config.ContainerConfig

    assertEquals("0", jsUri.getQueryParameter(Param.CONTAINER_MODE.getKey()));
  }

  @Test
  public void makeJsUriWithVersionerNoVersionOnIgnoreCache() {
    ContainerConfig config = mockConfig("http://www.js.org", "/gadgets/js");
    Gadget gadget = mockGadget(true, false)// no cache
    List<String> extern = Lists.newArrayList("feature");
    String version = "verstring";
    Versioner versioner = this.mockVersioner(extern, version, version);
    TestDefaultJsUriManager manager = makeManager(config, versioner);
View Full Code Here

Examples of org.apache.shindig.config.ContainerConfig

    assertEquals("0", jsUri.getQueryParameter(Param.CONTAINER_MODE.getKey()));
  }
 
  @Test
  public void makeJsUriWithContainerContext() {
    ContainerConfig config = mockConfig("http://www.js.org", "/gadgets/js/");
    TestDefaultJsUriManager manager = makeManager(config, null);
    Gadget gadget = mockGadget(false, false, true);
    List<String> extern = Lists.newArrayList("feature", "another");
    Uri jsUri = manager.makeExternJsUri(gadget, extern);
    assertFalse(manager.hadError());
View Full Code Here

Examples of org.apache.shindig.config.ContainerConfig

  }

  // processJsUri tests
  @Test(expected = RuntimeException.class)
  public void processMissingHostConfig() throws GadgetException {
    ContainerConfig config = mockConfig(null, "/gadgets/js");
    DefaultJsUriManager manager = makeManager(config, null);
    manager.processExternJsUri(Uri.parse("http://example.com?container=" + CONTAINER));
  }
View Full Code Here

Examples of org.apache.shindig.config.ContainerConfig

    manager.processExternJsUri(Uri.parse("http://example.com?container=" + CONTAINER));
  }

  @Test(expected = RuntimeException.class)
  public void processMissingPathConfig() throws GadgetException {
    ContainerConfig config = mockConfig("foo", null);
    DefaultJsUriManager manager = makeManager(config, null);
    manager.processExternJsUri(Uri.parse("http://example.com?container=" + CONTAINER));
  }
View Full Code Here

Examples of org.apache.shindig.config.ContainerConfig

    manager.processExternJsUri(Uri.parse("http://example.com?container=" + CONTAINER));
  }

  @Test
  public void processDefaultConfig() throws GadgetException {
    ContainerConfig config = mockDefaultConfig("foo", "/gadgets/js");
    DefaultJsUriManager manager = makeManager(config, null);
    manager.processExternJsUri(Uri.parse("http://example.com?container=" + CONTAINER));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.