Package org.waveprotocol.wave.model.document.operation

Examples of org.waveprotocol.wave.model.document.operation.DocOp$IsDocOp


    RangeNormalizer<DocOp> normalizer =
        new RangeNormalizer<DocOp>(new DocOpBuffer());
    normalizer.retain(1);
    normalizer.characters("");
    normalizer.retain(1);
    DocOp docOp = normalizer.finish();
    DocOp expected = new DocOpBuilder()
        .retain(2)
        .build();
    assertTrue(OpComparators.SYNTACTIC_IDENTITY.equal(expected, docOp));
  }
View Full Code Here


    normalizer.retain(1);
    normalizer.deleteCharacters("a");
    normalizer.deleteCharacters("b");
    normalizer.deleteCharacters("c");
    normalizer.retain(1);
    DocOp docOp = normalizer.finish();
    DocOp expected = new DocOpBuilder()
        .retain(1)
        .deleteCharacters("abc")
        .retain(1)
        .build();
    assertTrue(OpComparators.SYNTACTIC_IDENTITY.equal(expected, docOp));
View Full Code Here

    RangeNormalizer<DocOp> normalizer =
        new RangeNormalizer<DocOp>(new DocOpBuffer());
    normalizer.retain(1);
    normalizer.deleteCharacters("");
    normalizer.retain(1);
    DocOp docOp = normalizer.finish();
    DocOp expected = new DocOpBuilder()
        .retain(2)
        .build();
    assertTrue(OpComparators.SYNTACTIC_IDENTITY.equal(expected, docOp));
  }
View Full Code Here

      // ok
    }
  }

  public void testComposerChecking() throws OperationException {
    DocOp checked = new DocOpBuilder().build();
    DocOp unchecked = new DocOpBuilder().elementStart(".!$*.4!(,", Attributes.EMPTY_MAP)
        .elementEnd().buildUnchecked();

    try {
      Composer.compose(checked, unchecked);
      fail();
View Full Code Here

    normalizer.retain(1);
    normalizer.annotationBoundary(ANNOTATIONS3);
    normalizer.retain(1);
    normalizer.annotationBoundary(ANNOTATIONS4);
    normalizer.retain(1);
    DocOp docOp = normalizer.finish();
    DocOp expected = new DocOpBuilder()
        .retain(1)
        .annotationBoundary(ANNOTATIONS1)
        .retain(1)
        .annotationBoundary(ANNOTATIONS2)
        .retain(1)
View Full Code Here

    normalizer.retain(1);
    normalizer.annotationBoundary(ANNOTATIONS3);
    normalizer.retain(1);
    normalizer.annotationBoundary(ANNOTATIONS4);
    normalizer.retain(1);
    DocOp docOp = normalizer.finish();
    DocOp expected = new DocOpBuilder()
        .retain(1)
        .annotationBoundary(ANNOTATIONS12)
        .retain(1)
        .annotationBoundary(ANNOTATIONS3)
        .retain(1)
View Full Code Here

    normalizer.annotationBoundary(ANNOTATIONS2);
    normalizer.annotationBoundary(ANNOTATIONS3);
    normalizer.retain(1);
    normalizer.annotationBoundary(ANNOTATIONS4);
    normalizer.retain(1);
    DocOp docOp = normalizer.finish();
    DocOp expected = new DocOpBuilder()
        .retain(1)
        .annotationBoundary(ANNOTATIONS1)
        .retain(1)
        .annotationBoundary(ANNOTATIONS23)
        .retain(1)
View Full Code Here

    normalizer.annotationBoundary(ANNOTATIONS2);
    normalizer.annotationBoundary(ANNOTATIONS3);
    normalizer.retain(1);
    normalizer.annotationBoundary(ANNOTATIONS4);
    normalizer.retain(1);
    DocOp docOp = normalizer.finish();
    DocOp expected = new DocOpBuilder()
        .retain(1)
        .annotationBoundary(ANNOTATIONS123)
        .retain(1)
        .annotationBoundary(ANNOTATIONS4)
        .retain(1)
View Full Code Here

    normalizer.retain(0);
    normalizer.annotationBoundary(ANNOTATIONS3);
    normalizer.retain(1);
    normalizer.annotationBoundary(ANNOTATIONS4);
    normalizer.retain(1);
    DocOp docOp = normalizer.finish();
    DocOp expected = new DocOpBuilder()
        .retain(1)
        .annotationBoundary(ANNOTATIONS123)
        .retain(1)
        .annotationBoundary(ANNOTATIONS4)
        .retain(1)
View Full Code Here

    normalizer.characters("");
    normalizer.annotationBoundary(ANNOTATIONS3);
    normalizer.retain(1);
    normalizer.annotationBoundary(ANNOTATIONS4);
    normalizer.retain(1);
    DocOp docOp = normalizer.finish();
    DocOp expected = new DocOpBuilder()
        .retain(1)
        .annotationBoundary(ANNOTATIONS123)
        .retain(1)
        .annotationBoundary(ANNOTATIONS4)
        .retain(1)
View Full Code Here

TOP

Related Classes of org.waveprotocol.wave.model.document.operation.DocOp$IsDocOp

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.