Examples of level()


Examples of com.linkedin.data.element.DataElement.level()

    {
      assertEquals(e.level(), 0, "preorder traversal of " + input + " started with level " + e.level());
    }
    else
    {
      assertEquals(e.level(), 2, "postorder traversal of " + input + " started with level " + e.level());
    }
  }

  public void benchmarkImmutable(int count, final IterationOrder order)
  {
View Full Code Here

Examples of com.moesol.geoserver.sync.json.Sha1SyncJson.level()

        new IdAndValueSha1s(new Sha1Value("cf300c55b1d127f07005fe22d6ec12fa2501f089"), fake),
        new IdAndValueSha1s(new Sha1Value("cf64472f30a25d72b259b220cc484cab72b8fa4b"), fake)));
    m_grouper.groupForLevel(1);
    Sha1SyncJson json = m_grouper.getJson();
   
    assertEquals(1, json.level());
    assertEquals(5, json.hashes().size());
    assertEquals(2, json.max());
  }
 
}
View Full Code Here

Examples of com.moesol.geoserver.sync.json.Sha1SyncJson.level()

        // NOTE: If this test fails check to see if the geoserver sample data changed.
        //

    Sha1SyncJson sync = new Gson().fromJson(result, Sha1SyncJson.class);
   
    assertEquals(0, sync.level());
    assertEquals(1, sync.hashes().size());
    assertEquals("", sync.hashes().get(0).position());
    assertEquals("d3659f943fcdda512093d1c573856e8295201c23", sync.hashes().get(0).summary());
        assertEquals(2L, sync.max());
    }
View Full Code Here

Examples of com.moesol.geoserver.sync.json.Sha1SyncJson.level()

      // "&outputFormat=sha1Sync&format_options=ATTRIBUTES:-all;SYNC:{l\\:0}");
      SyncChecksumOutputFormat.JUNIT_SHA1_SYNC.set("{l:0, h:[{p:''}]}");
        String result = getAsString("wfs?request=GetFeature&typeName=cite:Buildings" +
          "&outputFormat=SyncChecksum&format_options=ATTRIBUTES:-all");
      Sha1SyncJson sync = new Gson().fromJson(result, Sha1SyncJson.class);
        assertEquals(1, sync.level());
        assertEquals("1b", sync.hashes().get(0).position());
        assertEquals(EXPECTED1_SHA1, sync.hashes().get(0).summary());
        assertEquals("52", sync.hashes().get(1).position());
        assertEquals(EXPECTED2_SHA1, sync.hashes().get(1).summary());
        assertEquals(1L, sync.max());
View Full Code Here

Examples of com.moesol.geoserver.sync.json.Sha1SyncJson.level()

      // "&outputFormat=sha1Sync&format_options=ATTRIBUTES:-all;SYNC:{l\\:1}");
      SyncChecksumOutputFormat.JUNIT_SHA1_SYNC.set("{l:1,h:[{p:'1b'},{p:'52'}]}");
        String result = getAsString("wfs?request=GetFeature&typeName=cite:Buildings" +
            "&outputFormat=SyncChecksum&format_options=ATTRIBUTES:-all");
        Sha1SyncJson sync = new Gson().fromJson(result, Sha1SyncJson.class);
        assertEquals(2, sync.level());
        assertEquals(2, sync.hashes().size());
        assertEquals("1bc8", sync.hashes().get(0).position());
        assertEquals(EXPECTED1_SHA1, sync.hashes().get(0).summary());
        assertEquals("5259", sync.hashes().get(1).position());
        assertEquals(EXPECTED2_SHA1, sync.hashes().get(1).summary());
View Full Code Here

Examples of com.moesol.geoserver.sync.json.Sha1SyncJson.level()

      // "&outputFormat=sha1Sync&format_options=ATTRIBUTES:-all;SYNC:{l\\:2}");
      SyncChecksumOutputFormat.JUNIT_SHA1_SYNC.set("{l:2,h:[{p:'1bc8'},{p:'5259'}]}");
        String result = getAsString("wfs?request=GetFeature&typeName=cite:Buildings" +
        "&outputFormat=SyncChecksum&format_options=ATTRIBUTES:-all");
        Sha1SyncJson sync = new Gson().fromJson(result, Sha1SyncJson.class);
        assertEquals(3, sync.level());
        assertEquals(2, sync.hashes().size());
        assertEquals("1bc80f", sync.hashes().get(0).position());
        assertEquals(EXPECTED1_SHA1, sync.hashes().get(0).summary());
        assertEquals("525983", sync.hashes().get(1).position());
        assertEquals(EXPECTED2_SHA1, sync.hashes().get(1).summary());
View Full Code Here

Examples of com.moesol.geoserver.sync.json.Sha1SyncJson.level()

      // "&outputFormat=sha1Sync&format_options=ATTRIBUTES:-all;SYNC:{l\\:2}");
      SyncChecksumOutputFormat.JUNIT_SHA1_SYNC.set("{l:2,h:[{p:'1bc8'}]}");
        String result = getAsString("wfs?request=GetFeature&typeName=cite:Buildings" +
          "&outputFormat=SyncChecksum&format_options=ATTRIBUTES:-all");
        Sha1SyncJson sync = new Gson().fromJson(result, Sha1SyncJson.class);
        assertEquals(3, sync.level());
        assertEquals(1, sync.hashes().size());
        assertEquals("1bc80f", sync.hashes().get(0).position());
        assertEquals(EXPECTED1_SHA1, sync.hashes().get(0).summary());
        assertEquals(1L, sync.max());
    }
View Full Code Here

Examples of com.moesol.geoserver.sync.json.Sha1SyncJson.level()

      // "&outputFormat=sha1Sync&format_options=ATTRIBUTES:-all;SYNC:{l\\:2}");
      SyncChecksumOutputFormat.JUNIT_SHA1_SYNC.set("{l:2}");
        String result = getAsString("wfs?request=GetFeature&typeName=cite:Buildings" +
          "&outputFormat=SyncChecksum&format_options=ATTRIBUTES:-all");
        Sha1SyncJson sync = new Gson().fromJson(result, Sha1SyncJson.class);
        assertEquals(3, sync.level());
        assertEquals(0, sync.hashes().size());
        assertEquals(1L, sync.max());
    }
    @Test
    public void testOutputFormat2() throws Exception {
View Full Code Here

Examples of com.moesol.geoserver.sync.json.Sha1SyncJson.level()

      SyncChecksumOutputFormat.JUNIT_SHA1_SYNC.set("{l: -1}");
        String result = getAsString("wfs?request=GetFeature&typeName=cite:Buildings" +
        "&outputFormat=SyncChecksum&format_options=ATTRIBUTES:-all");
        System.out.println("result: " + result);
        Sha1SyncJson sync = new Gson().fromJson(result, Sha1SyncJson.class);
        assertEquals(0, sync.level());
        assertEquals(1, sync.hashes().size());
        assertEquals("", sync.hashes().get(0).position());
        assertEquals("103d2f424918116a0e95dffd91f9ca36e1657ad0", sync.hashes().get(0).summary());
        assertEquals(2L, sync.max());
    }
View Full Code Here

Examples of com.moesol.geoserver.sync.json.Sha1SyncJson.level()

    @Test
    public void testOutputFormat3() throws Exception {
        String result = getAsString("wfs?request=GetFeature&typeName=cite:Buildings" +
            "&outputFormat=SyncChecksum");
        Sha1SyncJson sync = new Gson().fromJson(result, Sha1SyncJson.class);
        assertEquals(0, sync.level());
        assertEquals(1, sync.hashes().size());
        assertEquals("", sync.hashes().get(0).position());
        assertEquals("883aa2473212d6cd9c40db6df655b803b6b69de3", sync.hashes().get(0).summary());
        assertEquals(2L, sync.max());
    }
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.