Examples of Functions


Examples of org.apache.shindig.expressions.Functions

  @Before
  public void setUp() throws Exception {
    JSONObject config = createConfig();

    JsonContainerConfig containerConfig =
        new JsonContainerConfig(config, new Expressions(new Functions(), null, new ShindigTypeConverter()));
    mockFetcher = mock(HttpFetcher.class);
    fetcher = new DefaultServiceFetcher(containerConfig, mockFetcher);
  }
View Full Code Here

Examples of org.apache.shindig.expressions.Functions

    config.getJSONObject("default").
        getJSONObject(DefaultServiceFetcher.GADGETS_FEATURES_CONFIG)
        .remove(DefaultServiceFetcher.OSAPI_FEATURE_CONFIG);
    JsonContainerConfig containerConfig =
        new JsonContainerConfig(config,
            new Expressions(new Functions(), null, new ShindigTypeConverter()));
    fetcher = new DefaultServiceFetcher(containerConfig, mockFetcher);

    EasyMock.expect(mockFetcher.fetch(EasyMock.isA(HttpRequest.class))).andReturn(
        new HttpResponse("")).anyTimes();
    replay();
View Full Code Here

Examples of org.apache.shindig.expressions.Functions

  @Before
  public void setUp() throws Exception {
    JSONObject config = createConfig();

    JsonContainerConfig containerConfig =
        new JsonContainerConfig(config, Expressions.forTesting(new Functions()));
    mockFetcher = mock(HttpFetcher.class);
    fetcher = new DefaultServiceFetcher(containerConfig, mockFetcher);
  }
View Full Code Here

Examples of org.apache.shindig.expressions.Functions

    config.getJSONObject("default").
        getJSONObject(DefaultServiceFetcher.GADGETS_FEATURES_CONFIG)
        .remove(DefaultServiceFetcher.OSAPI_FEATURE_CONFIG);
    JsonContainerConfig containerConfig =
        new JsonContainerConfig(config,
            Expressions.forTesting(new Functions()));
    fetcher = new DefaultServiceFetcher(containerConfig, mockFetcher);

    EasyMock.expect(mockFetcher.fetch(EasyMock.isA(HttpRequest.class))).andReturn(
        new HttpResponse("")).anyTimes();
    replay();
View Full Code Here

Examples of org.apache.shindig.expressions.Functions

  @Before
  public void setUp() throws Exception {
    JSONObject config = createConfig();

    JsonContainerConfig containerConfig =
        new JsonContainerConfig(config, Expressions.forTesting(new Functions()));
    mockFetcher = mock(HttpFetcher.class);
    fetcher = new DefaultServiceFetcher(containerConfig, mockFetcher);
  }
View Full Code Here

Examples of org.apache.shindig.expressions.Functions

    config.getJSONObject("default").
        getJSONObject(DefaultServiceFetcher.GADGETS_FEATURES_CONFIG)
        .remove(DefaultServiceFetcher.OSAPI_FEATURE_CONFIG);
    JsonContainerConfig containerConfig =
        new JsonContainerConfig(config,
            Expressions.forTesting(new Functions()));
    fetcher = new DefaultServiceFetcher(containerConfig, mockFetcher);

    EasyMock.expect(mockFetcher.fetch(EasyMock.isA(HttpRequest.class))).andReturn(
        new HttpResponse("")).anyTimes();
    replay();
View Full Code Here

Examples of org.apache.shindig.expressions.Functions

        .getJSONObject(DefaultServiceFetcher.OSAPI_FEATURE_CONFIG)
        .put(DefaultServiceFetcher.OSAPI_BASE_ENDPOINTS, new JSONArray(ImmutableList.of(endPoint1)));

    JsonContainerConfig containerConfig =
        new JsonContainerConfig(config,
            Expressions.forTesting(new Functions()));
    CapturingHttpFetcher httpFetcher = new CapturingHttpFetcher();
    fetcher = new DefaultServiceFetcher(containerConfig, httpFetcher);
    Multimap<String, String> services = fetcher.getServicesForContainer("default", "dontcare");
    assertEquals(configuredServices, services);
    assertNotNull( httpFetcher.request );
View Full Code Here

Examples of org.apache.shindig.expressions.Functions

  @Before
  public void setUp() throws Exception {
    JSONObject config = createConfig();

    JsonContainerConfig containerConfig =
        new JsonContainerConfig(config, Expressions.forTesting(new Functions()));
    mockFetcher = mock(HttpFetcher.class);
    fetcher = new DefaultServiceFetcher(containerConfig, mockFetcher);
  }
View Full Code Here

Examples of org.apache.shindig.expressions.Functions

    config.getJSONObject("default").
        getJSONObject(DefaultServiceFetcher.GADGETS_FEATURES_CONFIG)
        .remove(DefaultServiceFetcher.OSAPI_FEATURE_CONFIG);
    JsonContainerConfig containerConfig =
        new JsonContainerConfig(config,
            Expressions.forTesting(new Functions()));
    fetcher = new DefaultServiceFetcher(containerConfig, mockFetcher);

    EasyMock.expect(mockFetcher.fetch(EasyMock.isA(HttpRequest.class))).andReturn(
        new HttpResponse("")).anyTimes();
    replay();
View Full Code Here

Examples of org.apache.shindig.expressions.Functions

        .getJSONObject(DefaultServiceFetcher.OSAPI_FEATURE_CONFIG)
        .put(DefaultServiceFetcher.OSAPI_BASE_ENDPOINTS, new JSONArray(ImmutableList.of(endPoint1)));

    JsonContainerConfig containerConfig =
        new JsonContainerConfig(config,
            Expressions.forTesting(new Functions()));
    CapturingHttpFetcher httpFetcher = new CapturingHttpFetcher();
    fetcher = new DefaultServiceFetcher(containerConfig, httpFetcher);
    fetcher.setSecurityTokenCodec( new BasicSecurityTokenCodec() );
    Multimap<String, String> services = fetcher.getServicesForContainer("default", "dontcare");
    assertEquals(configuredServices, services);
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.