X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=trunk%2Fsystem%2Fgeneral%2Fsrc%2Ftest%2Fjava%2Forg%2Fwamblee%2Fsystem%2FEnvironment.java;h=27537e0a850b9b297dd9058b3f5ca30e519ac3a1;hb=43ab66f665c102850f1d31d1e96244899c9ff407;hp=e2bd2b8053731fc0b603d1e297a9116f69fa9b61;hpb=a3174838834580b0e66e103597562c68b0ebf38b;p=utils diff --git a/trunk/system/general/src/test/java/org/wamblee/system/Environment.java b/trunk/system/general/src/test/java/org/wamblee/system/Environment.java index e2bd2b80..27537e0a 100644 --- a/trunk/system/general/src/test/java/org/wamblee/system/Environment.java +++ b/trunk/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 ProvidedInterface[] PROVIDED = - new ProvidedInterface[] { + 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 RequiredInterface[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