Package org.apache.shindig.social.core.util

Examples of org.apache.shindig.social.core.util.BeanJsonConverter


    Injector injector = Guice.createInjector(new SocialApiTestsGuiceModule());

    servlet = new DataServiceServlet();

    servlet.setHandlerDispatcher(injector.getInstance(HandlerDispatcher.class));
    servlet.setBeanConverters(new BeanJsonConverter(injector),
        new BeanXStreamConverter(new XStream081Configuration(injector)),
        new BeanXStreamAtomConverter(new XStream081Configuration(injector)));

    req = EasyMock.createMock(HttpServletRequest.class);
    res = EasyMock.createMock(HttpServletResponse.class);
View Full Code Here


        "{method:people.get,id:id,params:{"
            + "userId:john.doe,"
            + "groupId:@self,"
            + "fields:[huey,dewey,louie]"
            + "}}");
    request = new RpcRequestItem(baseRpc, FAKE_TOKEN, new BeanJsonConverter(Guice.createInjector()));
  }
View Full Code Here

    activity = new ActivityImpl("activityId", johnDoe.getId());

    activity.setMediaItems(Lists.<MediaItem>newArrayList(
        new MediaItemImpl("image/jpg", MediaItem.Type.IMAGE, "http://foo.bar")));

    beanJsonConverter = new BeanJsonConverter(
        Guice.createInjector(new SocialApiTestsGuiceModule()));
  }
View Full Code Here

  }

  public void testGetConverterForRequest() throws Exception {

    Injector injector = Guice.createInjector(new SocialApiTestsGuiceModule());
    BeanJsonConverter json = new BeanJsonConverter(injector);
    BeanXStreamConverter xml = new BeanXStreamConverter(new XStream081Configuration(injector));
    BeanXStreamAtomConverter atom = new BeanXStreamAtomConverter(new XStream081Configuration(injector));
    servlet.setBeanConverters(json, xml, atom);

    assertConverter(atom, "atom");
View Full Code Here

    assertConverter(json, "ahhhh!");
  }

  public void testGetConverterForRequestContentType() throws Exception {
    Injector injector = Guice.createInjector(new SocialApiTestsGuiceModule());
    BeanJsonConverter json = new BeanJsonConverter(injector);
    BeanXStreamConverter xml = new BeanXStreamConverter(new XStream081Configuration(injector));
    BeanXStreamAtomConverter atom = new BeanXStreamAtomConverter(new XStream081Configuration(injector));
    servlet.setBeanConverters(json, xml, atom);

    assertConverterForContentType(atom, "application/atom+xml");
View Full Code Here

  @Override protected void setUp() throws Exception {
    super.setUp();
    request = new RestfulRequestItem(
        DEFAULT_PATH + "?fields=huey,dewey,louie", "GET",
        "{name: 'Bob', id: '1234'}", FAKE_TOKEN, new BeanJsonConverter(Guice.createInjector()));
  }
View Full Code Here

        MediaItem.Type.IMAGE, "http://foo.bar")));

    Injector injector = Guice.createInjector(new JsonLibTestsGuiceModule());
    beanJsonLibConverter = injector.getInstance(BeanJsonLibConverter.class);

    beanJsonConverter = new BeanJsonConverter(
        Guice.createInjector(new SocialApiTestsGuiceModule()));

  }
View Full Code Here

TOP

Related Classes of org.apache.shindig.social.core.util.BeanJsonConverter

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.