1 15 package hivemind.test.rules; 16 17 import org.apache.hivemind.impl.ServicePointImpl; 18 import org.apache.hivemind.internal.Module; 19 import org.apache.hivemind.internal.ServicePoint; 20 import org.apache.hivemind.schema.Translator; 21 import org.apache.hivemind.schema.rules.ServicePointTranslator; 22 import org.apache.hivemind.test.HiveMindTestCase; 23 import org.easymock.MockControl; 24 25 30 public class TestServicePointTranslator extends HiveMindTestCase 31 { 32 public void testServicePointTranslator() 33 { 34 MockControl control = newControl(Module.class); 35 Module m = (Module) control.getMock(); 36 37 ServicePoint sp = new ServicePointImpl(m, null); 38 39 m.getServicePoint("Fred"); 40 control.setReturnValue(sp); 41 42 replayControls(); 43 44 Translator t = new ServicePointTranslator(); 45 46 ServicePoint result = (ServicePoint) t.translate(m, null, "Fred", null); 47 48 assertSame(sp, result); 49 50 verifyControls(); 51 } 52 } 53 | Popular Tags |