public void testBuildWaveletFromOneDelta() throws Exception { WaveletData wavelet = build(delta(addParticipant(CREATOR, 1093L, HashedVersion.unsigned(1)))); assertEquals(WAVELET_NAME, WaveletDataUtil.waveletNameOf(wavelet)); assertEquals(CREATOR, wavelet.getCreator()); assertEquals(1093L, wavelet.getCreationTime()); assertEquals(1093L, wavelet.getLastModifiedTime()); assertEquals(HashedVersion.unsigned(1), wavelet.getHashedVersion()); assertEquals(ImmutableSet.of(), wavelet.getDocumentIds()); assertEquals(ImmutableSet.of(CREATOR), wavelet.getParticipants()); }
public void testBuildWaveletFromThreeDeltas() throws Exception { WaveletData wavelet = build( delta(addParticipant(CREATOR, 1093L, HashedVersion.unsigned(1))), delta(addParticipant(JOE, 1492L, HashedVersion.unsigned(2))), delta(addBlip("blipid", 2010L, HashedVersion.unsigned(3)))); assertEquals(WAVELET_NAME, WaveletDataUtil.waveletNameOf(wavelet)); assertEquals(CREATOR, wavelet.getCreator()); assertEquals(1093L, wavelet.getCreationTime()); assertEquals(2010L, wavelet.getLastModifiedTime()); assertEquals(HashedVersion.unsigned(3), wavelet.getHashedVersion()); assertEquals(ImmutableSet.of("blipid"), wavelet.getDocumentIds()); assertEquals(ImmutableSet.of(CREATOR, JOE), wavelet.getParticipants()); }