1 17 package org.alfresco.service.cmr.repository; 18 19 import junit.framework.TestCase; 20 21 26 public class NodeRefTest extends TestCase 27 { 28 29 public NodeRefTest(String name) 30 { 31 super(name); 32 } 33 34 public void testStoreRef() throws Exception 35 { 36 StoreRef storeRef = new StoreRef("ABC", "123"); 37 assertEquals("toString failure", "ABC://123", storeRef.toString()); 38 39 StoreRef storeRef2 = new StoreRef(storeRef.getProtocol(), storeRef 40 .getIdentifier()); 41 assertEquals("equals failure", storeRef, storeRef2); 42 } 43 44 public void testNodeRef() throws Exception 45 { 46 StoreRef storeRef = new StoreRef("ABC", "123"); 47 NodeRef nodeRef = new NodeRef(storeRef, "456"); 48 assertEquals("toString failure", "ABC://123/456", nodeRef.toString()); 49 50 NodeRef nodeRef2 = new NodeRef(storeRef, "456"); 51 assertEquals("equals failure", nodeRef, nodeRef2); 52 } 53 } 54 | Popular Tags |