Package org.wicketstuff.pageserializer.common.analyze

Examples of org.wicketstuff.pageserializer.common.analyze.ISerializedObjectTree.label()


      + "      java.lang.Integer                                            |     1\n"
      + "  org.apache.wicket.request.mapper.parameter.PageParameters        |     3";

    ISerializedObjectTree sample = TreeReader.fromString(lines);

    Assert.assertEquals("0", sample.label());
    Assert.assertEquals(141, sample.size());
    Assert.assertEquals(146, sample.childSize());

    Assert.assertEquals(ListModel.class, sample.children()
      .get(1)
View Full Code Here


  @Test
  public void testCompression() throws IOException {
    IReportOutput reportOutput=new LoggerReportOutput();

    ISerializedObjectTree source = Trees.fromResource(getClass(), "sample1");
    Assert.assertEquals("asSample", source.label());
    ISerializedObjectTree result = SimilarNodeTreeTransformator.transformTree(source);
    new TreeSizeReport(reportOutput).process(result);
    ISerializedObjectTree match = Trees.fromResource(getClass(), "sample1-match");
    new TreeSizeReport(reportOutput).process(match);
View Full Code Here

  @Test
  public void secondNodeHasMoreChilds() throws IOException {
    IReportOutput reportOutput=new LoggerReportOutput();
   
    ISerializedObjectTree source = Trees.fromResource(getClass(), "nodeChildSize");
    Assert.assertEquals("asSample", source.label());
    new TreeSizeReport(reportOutput).process(source);
    ISerializedObjectTree result = SimilarNodeTreeTransformator.transformTree(source);
    new TreeSizeReport(reportOutput).process(result);
    ISerializedObjectTree match = Trees.fromResource(getClass(), "nodeChildSize-match");
    new TreeSizeReport(reportOutput).process(match);
View Full Code Here

      if (typeMap.hasLessEntries(transformed.size()))
      {
//        LOG.error("Compress {}",tree.type());
       
        List<ISerializedObjectTree> result = typeMap.compressedResult();
        ret = new ImmutableTree(ret.id(), ret.type(), ret.label(), ret.size(), result);
//        new TreeSizeReport().process(tree);
//        new TreeSizeReport().process(ret);
      } else {
        if (!sameEntries(tree.children(), transformed)) {
          ret = new ImmutableTree(ret.id(), ret.type(), ret.label(), ret.size(), transformed);
View Full Code Here

        ret = new ImmutableTree(ret.id(), ret.type(), ret.label(), ret.size(), result);
//        new TreeSizeReport().process(tree);
//        new TreeSizeReport().process(ret);
      } else {
        if (!sameEntries(tree.children(), transformed)) {
          ret = new ImmutableTree(ret.id(), ret.type(), ret.label(), ret.size(), transformed);
        }
      }
    }
    return ret;
  }
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.