/*
- * Copyright 2007 the original author or authors.
- *
+ * Copyright 2005-2010 the original author or authors.
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
package org.wamblee.system.container;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
import junit.framework.TestCase;
import org.wamblee.general.Pair;
-
import org.wamblee.system.core.Component;
import org.wamblee.system.core.DefaultProvidedInterface;
import org.wamblee.system.core.DefaultRequiredInterface;
import org.wamblee.system.core.Scope;
import org.wamblee.system.core.StringComponent;
import org.wamblee.system.core.SystemAssemblyException;
-
import org.wamblee.test.AssertionUtils;
import org.wamblee.test.EventTracker;
-import java.io.Serializable;
-
-import java.util.ArrayList;
-import java.util.List;
-
/**
*
* @author $author$
Component<?> comp = new Application();
Container system = new Container("top").addComponent(comp);
Container system2 = new Container("top2").addComponent(comp);
+
+ ignoredVariable(system);
+ ignoredVariable(system2);
} catch (SystemAssemblyException e) {
return;
}
fail();
}
+ private static void ignoredVariable(Object aObject) {
+ // for findbugs.
+ }
+
public void testCompositeWithExternalDependencesProvided() {
Component<?> environment = new Environment();
Component<?> application = new Application();
Scope external = new DefaultScope(new ProvidedInterface[0]);
external.publishInterface(provided, 100);
- Scope scope = container.start(external);
+ container.start(external);
}
public void testProvidedInterfaces() {
container.getRequiredInterfaces().get(1).setProvider(x);
container.getRequiredInterfaces().get(2).setProvider(y);
- Scope runtime = container.start(externalScope);
+ container.start(externalScope);
assertEquals("y-value", app.getString());
}