1 15 package org.apache.hivemind; 16 17 import hivemind.test.FrameworkTestCase; 18 19 import java.util.Locale ; 20 21 import org.apache.hivemind.definition.ModuleDefinition; 22 import org.apache.hivemind.definition.ImplementationDefinition; 23 import org.apache.hivemind.definition.Visibility; 24 import org.apache.hivemind.definition.impl.ModuleDefinitionImpl; 25 import org.apache.hivemind.definition.impl.ImplementationDefinitionImpl; 26 import org.apache.hivemind.definition.impl.ServicePointDefinitionImpl; 27 import org.apache.hivemind.impl.InterceptorStackImpl; 28 import org.apache.hivemind.impl.ModuleImpl; 29 import org.apache.hivemind.impl.RegistryInfrastructureImpl; 30 import org.apache.hivemind.impl.ServicePointImpl; 31 import org.apache.hivemind.internal.ServiceModel; 32 import org.apache.hivemind.internal.ServicePoint; 33 import org.easymock.MockControl; 34 35 41 42 public class TestToString extends FrameworkTestCase 43 { 44 45 public void testToString() 46 { 47 MockControl control = MockControl.createControl(ServicePoint.class); 48 ServicePoint mockServicePoint = (ServicePoint) control.getMock(); 49 50 ModuleImpl module = new ModuleImpl(); 51 module.setModuleId("module"); 52 module.toString(); 53 new RegistryInfrastructureImpl(null, Locale.ENGLISH).toString(); 54 new InterceptorStackImpl(null, mockServicePoint, null).toString(); 55 56 ModuleDefinition md = new ModuleDefinitionImpl("module", null, null, null); 57 ServicePointDefinitionImpl spd = new ServicePointDefinitionImpl(md, "service", null, 58 Visibility.PUBLIC, Runnable .class.getName()); 59 ImplementationDefinition sid = new ImplementationDefinitionImpl(md, 60 null, null, ServiceModel.PRIMITIVE, true); 61 spd.addImplementation(sid); 62 new ServicePointImpl(module, spd).toString(); 63 } 64 } 65 | Popular Tags |