1 5 package org.easymock.tests; 6 7 import junit.framework.TestCase; 8 9 import org.easymock.ArgumentsMatcher; 10 import org.easymock.MockControl; 11 12 public class EqualsMatcherTest extends TestCase { 13 final ArgumentsMatcher MATCHER = MockControl.EQUALS_MATCHER; 14 15 public void testEquals() { 16 assertTrue(MATCHER.matches(null, null)); 17 assertFalse(MATCHER.matches(null, new Object [0])); 18 assertFalse(MATCHER.matches(new Object [0], null)); 19 assertFalse(MATCHER.matches(new Object [] { "" }, new Object [] { null })); 20 assertFalse(MATCHER.matches(new Object [] { null }, new Object [] { "" })); 21 assertTrue(MATCHER 22 .matches(new Object [] { null }, new Object [] { null })); 23 } 24 25 public void testDifferentNumberOfArguments() { 26 assertFalse(MATCHER.matches(new Object [2], new Object [3])); 27 } 28 } | Popular Tags |