X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=system%2Fgeneral%2Fsrc%2Ftest%2Fjava%2Forg%2Fwamblee%2Fsystem%2FEnvironment.java;h=27537e0a850b9b297dd9058b3f5ca30e519ac3a1;hb=6a914dcbd1c89027eafae6021af4199a636e4e48;hp=76d3a3c1bfbb9bf0d736eeab4a1b7b103084b07d;hpb=6528585feb4b95cd50d63d5f4230b5eeb3e606d9;p=utils diff --git a/system/general/src/test/java/org/wamblee/system/Environment.java b/system/general/src/test/java/org/wamblee/system/Environment.java index 76d3a3c1..27537e0a 100644 --- a/system/general/src/test/java/org/wamblee/system/Environment.java +++ b/system/general/src/test/java/org/wamblee/system/Environment.java @@ -5,20 +5,21 @@ import javax.sql.DataSource; public class Environment extends AbstractComponent { - private static final ProvidedInterfaceDescriptor[] PROVIDED = - new ProvidedInterfaceDescriptor[] { + private static final ProvidedInterface[] provided() { + return new ProvidedInterface[] { new DefaultProvidedInterfaceDescriptor("datasource", DataSource.class), new DefaultProvidedInterfaceDescriptor("integer", Integer.class) }; + } - public Environment(ServiceRegistry aRegistry) { - super("environment", aRegistry, PROVIDED, new InterfaceDescriptor[0]); + public Environment() { + super("environment", provided(), new RequiredInterface[0]); } @Override - protected void doStart(String aContext, Service[] aRequiredServices) { - addService(aContext, PROVIDED[0], new Integer(1)); - addService(aContext, PROVIDED[1], new Integer(2)); + protected void doStart(String aContext) { + addService(aContext, getProvidedServices()[0], new Integer(1)); + addService(aContext, getProvidedServices()[1], new Integer(2)); } @Override