01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.object.dna.impl;
05:
06: import junit.framework.TestCase;
07:
08: public class ClassInstanceTest extends TestCase {
09:
10: public void testEquals() {
11: ClassInstance c1 = new ClassInstance("name", "def");
12: ClassInstance c2 = new ClassInstance("name", "def");
13: ClassInstance c3 = new ClassInstance("def", "name");
14: assertEquals(c1, c2);
15: assertEquals(c1.hashCode(), c2.hashCode());
16: assertFalse(c1.equals(c3));
17: assertFalse(c3.equals(c1));
18: }
19:
20: }
|