1 15 package org.apache.hivemind.test; 16 17 23 public class TestAggregateArgumentsMatcher extends HiveMindTestCase 24 { 25 29 public void testOutOfRange() 30 { 31 AggregateArgumentsMatcher matcher = new AggregateArgumentsMatcher(new ArgumentMatcher[] {}); 32 33 assertEquals(true, matcher.matches(new String [] 34 { "foo" }, new String [] 35 { "foo" })); 36 37 assertEquals(false, matcher.matches(new String [] 38 { "foo" }, new String [] 39 { "bar" })); 40 } 41 42 45 public void testCompareNull() 46 { 47 ArgumentMatcher am = (ArgumentMatcher) newMock(ArgumentMatcher.class); 48 49 AggregateArgumentsMatcher matcher = new AggregateArgumentsMatcher(new ArgumentMatcher[] 50 { am }); 51 52 replayControls(); 53 54 assertEquals(false, matcher.matches(new String [] 55 { "foo" }, new String [] 56 { null })); 57 58 verifyControls(); 59 } 60 } | Popular Tags |