/** * Tests that setting a null anchor updates the manifest and makes the wavelet * un-anchored. */ public void testClearAnchorClearsManifest() { WaveletBasedConversation conversation2 = makeConversation(); populate(conversation2); Anchor anchor = conversation2.createAnchor(getFirstBlip(conversation2)); target.setAnchor(anchor); target.setAnchor(null); assertNull(getManifestAttribute(manifestDoc, "anchorWavelet")); assertNull(getManifestAttribute(manifestDoc, "anchorBlip")); }
/** * Tests that setting a null anchor updates the manifest and makes the wavelet * un-anchored. */ public void testClearAnchorClearsManifest() { WaveletBasedConversation conversation2 = makeConversation(); populate(conversation2); Anchor anchor = conversation2.createAnchor(getFirstBlip(conversation2)); target.setAnchor(anchor); target.setAnchor(null); assertNull(getManifestAttribute(manifestDoc, "anchorWavelet")); assertNull(getManifestAttribute(manifestDoc, "anchorBlip")); }
/** * Tests that setting an anchor updates the conversation manifest correctly. */ public void testSetAnchorUpdatesManifest() { // Anchor target(wavelet1) in alternate (wavelet2). WaveletBasedConversation conversation2 = makeConversation(); populate(conversation2); ConversationBlip firstBlip = getFirstBlip(conversation2); Anchor anchor = conversation2.createAnchor(firstBlip); target.setAnchor(anchor); assertEquals(WaveletBasedConversation.idFor(conversation2.getWavelet().getId()), getManifestAttribute(manifestDoc, "anchorWavelet")); assertEquals(firstBlip.getId(), getManifestAttribute(manifestDoc, "anchorBlip")); }
/** * Tests that setting an anchor updates the conversation manifest correctly. */ public void testSetAnchorUpdatesManifest() { // Anchor target(wavelet1) in alternate (wavelet2). WaveletBasedConversation conversation2 = makeConversation(); populate(conversation2); ConversationBlip firstBlip = getFirstBlip(conversation2); Anchor anchor = conversation2.createAnchor(firstBlip); target.setAnchor(anchor); assertEquals(WaveletBasedConversation.idFor(conversation2.getWavelet().getId()), getManifestAttribute(manifestDoc, "anchorWavelet")); assertEquals(firstBlip.getId(), getManifestAttribute(manifestDoc, "anchorBlip")); }