@@ -0,0 +1,1556 @@
+package org.rubyforge.debugcommons.model;%0A%0Aimport junit.framework.TestCase;%0A%0Apublic class RubyVariableTest extends TestCase %7B%0A%0A    public RubyVariableTest(String testName) %7B%0A        super(testName);%0A    %7D%0A%0A    public void testEqualsAndHashCode() %7B%0A        RubyVariableInfo info1 = new RubyVariableInfo(null, %22class%22, %22hello%22, null, false, %220x1234%22);%0A        RubyVariable v1a = new RubyVariable(null, info1);%0A        RubyVariable v1b = new RubyVariable(null, info1);%0A        assertTrue(%22v1a and v1b equals%22, v1a.equals(v1b));%0A        assertEquals(%22same hashcode for v1a and v1b%22, v1a.hashCode(), v1b.hashCode());%0A%0A        RubyVariableInfo info2 = new RubyVariableInfo(null, %22class%22, %22cau%22, null, false, %220x4321%22);%0A        RubyVariable v2 = new RubyVariable(null, info2);%0A        assertFalse(%22v1a and v2 not equals%22, v1a.equals(v2));%0A        assertFalse(%22v1b and v2 not equals%22, v1b.equals(v2));%0A        assertFalse(%22different hashcode for v2 and v1a%22, v2.hashCode() == v1a.hashCode());%0A        assertFalse(%22different hashcode for v2 and v1b%22, v2.hashCode() == v1b.hashCode());%0A%0A        RubyVariableInfo nilInfo = new RubyVariableInfo(null, %22class%22, null, null, false, null);%0A        RubyVariable nil = new RubyVariable(null, nilInfo);%0A        assertFalse(%22v1a and nil not equals%22, nil.equals(v1a));%0A        assertFalse(%22v1b and nil not equals%22, v1b.equals(nil));%0A        assertFalse(%22different hashcode for nil and v1a%22, nil.hashCode() == v1a.hashCode());%0A        assertFalse(%22different hashcode for nil and v1b%22, nil.hashCode() == v1b.hashCode());%0A    %7D%0A%7D%0A

test for RubyVariable - hashCode and equals