import junit.framework.TestCase;
import org.wamblee.io.ClassPathResource;
-import org.wamblee.system.AbstractProvidedInterfaceDescriptor;
-import org.wamblee.system.AbstractProvidedInterfaceDescriptor;
+import org.wamblee.system.DefaultProvidedInterfaceDescriptor;
import org.wamblee.system.DefaultRequiredInterfaceDescriptor;
import org.wamblee.system.DefaultServiceRegistry;
import org.wamblee.system.ProvidedInterfaceDescriptor;
import org.wamblee.system.RequiredInterfaceDescriptor;
import org.wamblee.system.Service;
-import org.wamblee.system.InterfaceDescriptor;
import org.wamblee.system.ServiceRegistry;
import org.wamblee.system.SystemAssemblyException;
public void testOneProvidedService() {
Map<String, ProvidedInterfaceDescriptor> provided = new HashMap<String, ProvidedInterfaceDescriptor>();
- provided.put("helloService", new AbstractProvidedInterfaceDescriptor(
+ provided.put("helloService", new DefaultProvidedInterfaceDescriptor(
"hello", HelloService.class));
SpringComponent system = new SpringComponent("system", _registry,
public void testWithProperties() throws IOException {
Map<String, ProvidedInterfaceDescriptor> provided = new HashMap<String, ProvidedInterfaceDescriptor>();
- provided.put("helloService", new AbstractProvidedInterfaceDescriptor(
+ provided.put("helloService", new DefaultProvidedInterfaceDescriptor(
"hello", HelloService.class));
SpringComponent system = new SpringComponent("system", _registry,
new String[] { HELLO_SERVICE_SPRING_WITH_PROPERTIES_XML },
new HashMap<String, ProvidedInterfaceDescriptor>(), required);
HelloService helloObject = new HelloService("ladida");
- Service helloService = _registry.register(new AbstractProvidedInterfaceDescriptor("hello", HelloService.class), helloObject);
+ Service helloService = _registry.register(new DefaultProvidedInterfaceDescriptor("hello", HelloService.class), helloObject);
system.start("Bla", new Service[] { helloService } );
system.stop();
}
required.put(new DefaultRequiredInterfaceDescriptor("hello", HelloService.class),
"helloService");
Map<String,ProvidedInterfaceDescriptor> provided = new HashMap<String, ProvidedInterfaceDescriptor>();
- provided.put("blaService", new AbstractProvidedInterfaceDescriptor("bla",
+ provided.put("blaService", new DefaultProvidedInterfaceDescriptor("bla",
BlaService.class));
SpringComponent system = new SpringComponent("system", _registry,
provided, required);
HelloService helloObject = new HelloService("ladida");
- Service helloService = _registry.register(new AbstractProvidedInterfaceDescriptor("hello", HelloService.class), helloObject);
+ Service helloService = _registry.register(new DefaultProvidedInterfaceDescriptor("hello", HelloService.class), helloObject);
Service[] services = system.start("Bla", new Service[] { helloService } );
assertEquals(1, services.length);