Package org.apache.shindig.gadgets.uri.ProxyUriManager

Examples of org.apache.shindig.gadgets.uri.ProxyUriManager.ProxyUri


  @Test
  public void makeList() throws Exception {
    Capture<List<ProxyUri>> uriCapture = new Capture<List<ProxyUri>>();
    Capture<Integer> intCapture = new Capture<Integer>();
    ProxyUri proxyUri2 = createMock(ProxyUri.class);
    List<ProxyUri> input = Lists.newArrayList(proxyUri, proxyUri2);
    Uri uri2 = new UriBuilder().toUri();
    List<Uri> output = Lists.newArrayList(uri, uri2);
    Integer refresh = new Integer(0);
    String mime = "my/mime";
    expect(uriManager.make(capture(uriCapture), capture(intCapture)))
        .andReturn(output).once();
    replay(uriManager);
    expect(proxyUri.setSanitizeContent(true)).andReturn(proxyUri).once();
    expect(proxyUri.setRewriteMimeType(mime)).andReturn(proxyUri).once();
    expect(proxyUri2.setSanitizeContent(true)).andReturn(proxyUri2).once();
    expect(proxyUri2.setRewriteMimeType(mime)).andReturn(proxyUri2).once();
    replay(proxyUri, proxyUri2);

    SanitizingProxyUriManager rewriter = makeRewriter(mime);
    List<Uri> returned = rewriter.make(input, refresh);
View Full Code Here

TOP

Related Classes of org.apache.shindig.gadgets.uri.ProxyUriManager.ProxyUri

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.