1 15 package org.apache.hivemind.test; 16 17 23 public class TestArrayMatcher extends HiveMindTestCase 24 { 25 private Object [] _expected = new String [] 26 { "fred" }; 27 28 private ArrayMatcher _matcher = new ArrayMatcher(); 29 30 public void testActualIsNull() 31 { 32 assertEquals(false, _matcher.compareArguments(_expected, null)); 33 } 34 35 public void testWrongElementCount() 36 { 37 assertEquals(false, _matcher.compareArguments(_expected, new Object [] 38 { "barney", "wilma" })); 39 } 40 41 public void testMismatch() 42 { 43 assertEquals(false, _matcher.compareArguments(_expected, new Object [] 44 { "barney" })); 45 } 46 47 public void testMatch() 48 { 49 assertEquals(true, _matcher.compareArguments(_expected, new Object [] 50 { "fred" })); 51 } 52 } | Popular Tags |