Package org.waveprotocol.wave.concurrencycontrol.common

Examples of org.waveprotocol.wave.concurrencycontrol.common.DeltaPair.transform()


    // Deltas with same ops are the same, other info should be ignored
    assertTrue(DeltaPair.areSame(client, server));

    // Transforming the ops should result in only version update server ops
    DeltaPair pair = new DeltaPair(client, server);
    pair = pair.transform();
    assertEquals(0, pair.getClient().size());
    assertEquals(2, pair.getServer().size());
    checkVersionUpdate(pair.getServer().get(0), 1, null);
    checkVersionUpdate(pair.getServer().get(1), 1, resultingVersion);
  }
View Full Code Here


    List<WaveletOperation> server = CollectionUtils.newArrayList();
    server.add(SERVER_UTIL.insert(2, "1", 0, null));
    server.add(SERVER_UTIL.insert(1, "2", 2, null));

    DeltaPair pair = new DeltaPair(client, server);
    pair = pair.transform();
    // Expect the transformation of the inserts are correct. If client and server
    // have the same insert point, client op is transformed to the left of the server op.

    // Expect client inserts ".A..B."
    assertEquals(2, pair.getClient().size());
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.