1 /* Copyright (c) 2000-2003, jMock.org. See bundled LICENSE.txt */ 2 package org.jmock.expectation; 3 4 import org.jmock.AbstractTestCase; 5 6 public class TestNull extends AbstractTestCase { 7 8 public void testEquals() { 9 assertEquals("Should be same value", new Null(), new Null()); 10 assertEquals("Should be same hashCode", new Null().hashCode(), new Null().hashCode()); 11 12 assertEquals("Should be same value", new Null("one"), new Null("two")); 13 assertEquals("Should be same hashCode", new Null("one").hashCode(), new Null("two").hashCode()); 14 15 // Compare with other objects to assert that they are not equal 16 assertEquals("Not equal to something else", false, new Null("one").equals("one")); 17 assertEquals("Not equal to something else", false, new Null().equals(new Integer(2))); 18 } 19 20 public void testDescription() { 21 assertEquals("Description", "what it is", new Null("what it is").toString()); 22 } 23 }

This page was automatically generated by Maven