private void checkQueryStyle(boolean debug, boolean noCache, String version) throws Exception { String host = "host.com"; String path = "/proxy/path"; List<Uri> resources = ImmutableList.<Uri>of(RESOURCE_1); List<Uri> uris = makeAndGet(host, path, debug, noCache, resources, version); assertEquals(1, uris.size()); verifyQueryUri(RESOURCE_1, uris.get(0), debug, noCache, version, host, path); }
private void checkQueryStyle(boolean debug, boolean noCache, String version) throws Exception { String host = "host.com"; String path = "/proxy/path"; List<Uri> resources = ImmutableList.of(RESOURCE_1); List<Uri> uris = makeAndGet(host, path, debug, noCache, resources, version); assertEquals(1, uris.size()); verifyQueryUri(RESOURCE_1, uris.get(0), debug, noCache, version, host, path); }
private void checkQueryStyle(boolean debug, boolean noCache, String version) throws Exception { String host = "host.com"; String path = "/proxy/path"; List<Uri> resources = ImmutableList.of(RESOURCE_1); List<Uri> uris = makeAndGet(host, path, debug, noCache, resources, version); assertEquals(1, uris.size()); verifyQueryUri(RESOURCE_1, uris.get(0), debug, noCache, version, host, path); }
@Test public void batchedProxyQueryStyle() throws Exception { String host = "host.com"; String path = "/proxy/path"; List<Uri> resources = ImmutableList.of(RESOURCE_1, RESOURCE_2, RESOURCE_3); String[] versions = new String[] { "v1", "v2", "v3" }; List<Uri> uris = makeAndGet(host, path, true, true, resources, versions); assertEquals(3, uris.size()); for (int i = 0; i < 3; ++i) { verifyQueryUri(resources.get(i), uris.get(i), true, true, versions[i], host, path); } }
@Test public void batchedProxyQueryStyle() throws Exception { String host = "host.com"; String path = "/proxy/path"; List<Uri> resources = ImmutableList.of(RESOURCE_1, RESOURCE_2, RESOURCE_3); String[] versions = new String[] { "v1", "v2", "v3" }; List<Uri> uris = makeAndGet(host, path, true, true, resources, versions); assertEquals(3, uris.size()); for (int i = 0; i < 3; ++i) { verifyQueryUri(resources.get(i), uris.get(i), true, true, versions[i], host, path); } }
@Test public void batchedProxyQueryStyle() throws Exception { String host = "host.com"; String path = "/proxy/path"; List<Uri> resources = ImmutableList.<Uri>of(RESOURCE_1, RESOURCE_2, RESOURCE_3); String[] versions = new String[] { "v1", "v2", "v3" }; List<Uri> uris = makeAndGet(host, path, true, true, resources, versions); assertEquals(3, uris.size()); for (int i = 0; i < 3; ++i) { verifyQueryUri(resources.get(i), uris.get(i), true, true, versions[i], host, path); } }
@Test public void testSchemaLessProxy() throws Exception { boolean debug = false; boolean noCache = false; String version = "ver"; String host = "host.com"; String path = "/proxy/path"; List<Uri> resources = ImmutableList.of(RESOURCE_4); List<Uri> uris = makeAndGet(host, path, debug, noCache, resources, version); assertEquals(1, uris.size()); verifyQueryUri(new UriBuilder(RESOURCE_4).setScheme("http").toUri(), new UriBuilder(uris.get(0)).setScheme("http").toUri(), debug, noCache, version, host, path); }
@Test public void testSchemaLessProxy() throws Exception { boolean debug = false; boolean noCache = false; String version = "ver"; String host = "host.com"; String path = "/proxy/path"; List<Uri> resources = ImmutableList.of(RESOURCE_4); List<Uri> uris = makeAndGet(host, path, debug, noCache, resources, version); assertEquals(1, uris.size()); verifyQueryUri(new UriBuilder(RESOURCE_4).setScheme("http").toUri(), new UriBuilder(uris.get(0)).setScheme("http").toUri(), debug, noCache, version, host, path); }