Package com.linkedin.restli.examples.groups.api

Examples of com.linkedin.restli.examples.groups.api.Location


  @Test
  public void testDiffFromNullNested() throws Exception
  {
    Group g1 = new Group();
    Group g2 = new Group(g1.data().copy());
    Location loc = new Location();
    loc.setLatitude(42.0f);
    loc.setLongitude(17.0f);
    g2.setLocation(loc);
    PatchTree update = PatchCreator.diff(g1, g2);
    assertEquals(update.toString(), "{$set={location={longitude=17.0, latitude=42.0}}}");
  }
View Full Code Here


  @Test
  public void testDiffFromOverwrittenNested() throws Exception
  {
    Group g1 = new Group();
    Location loc1 = new Location();
    loc1.setLatitude(0.0f);
    loc1.setLongitude(0.0f);
    g1.setLocation(loc1);

    Group g2 = new Group(g1.data().copy());
    Location loc2 = new Location();
    loc2.setLatitude(42.0f);
    loc2.setLongitude(17.0f);
    g2.setLocation(loc2);
    PatchTree update = PatchCreator.diff(g1, g2);
    assertEquals(update.toString(), "{location={$set={longitude=17.0, latitude=42.0}}}");
  }
View Full Code Here

    group.setIsOpenToNonMembers(true);
    group.setLargeLogoMediaUrl("/0/0/1/skafhdsjahiuewh");
    group.setLastModifiedTimestamp(System.currentTimeMillis());
    group.setLocale("en_US");

    Location location = new Location();
    location.setCountryCode("us");
    StringArray geoPlaceCodes = new StringArray();
    geoPlaceCodes.add("1-2-3-4-5");
    location.setGeoPlaceCodes(geoPlaceCodes);
    location.setGeoPostalCode("94043");
    location.setGmtOffset(-8f);
    location.setLatitude(122.1f);
    location.setLongitude(37.4f);
    location.setPostalCode("94043");
    location.setRegionCode(37);
    location.setUsesDaylightSavings(true);
    group.setLocation(location);

    group.setMaxFeeds(100);
    group.setMaxIdentityChanges(5);
    group.setMaxMembers(2000);
View Full Code Here

TOP

Related Classes of com.linkedin.restli.examples.groups.api.Location

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.