X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=system%2Fgeneral%2Fsrc%2Ftest%2Fjava%2Forg%2Fwamblee%2Fsystem%2Fcontainer%2FContainerTest.java;h=01f8a35f7c93b7685a109e638878849a2eb48a56;hb=dec278a67997ea8e85d10662e31548afd8890ed3;hp=25ec9bc231582572134759715b374889ba1d8e94;hpb=8de36ff0206c996baf3ee4adc3e2293b12ff5f39;p=utils diff --git a/system/general/src/test/java/org/wamblee/system/container/ContainerTest.java b/system/general/src/test/java/org/wamblee/system/container/ContainerTest.java index 25ec9bc2..01f8a35f 100644 --- a/system/general/src/test/java/org/wamblee/system/container/ContainerTest.java +++ b/system/general/src/test/java/org/wamblee/system/container/ContainerTest.java @@ -1,24 +1,27 @@ /* - * 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. * See the License for the specific language governing permissions and * limitations under the License. - */ + */ 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; @@ -29,15 +32,9 @@ import org.wamblee.system.core.RequiredInterface; 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$ @@ -222,12 +219,19 @@ public class ContainerTest extends TestCase { 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(); @@ -553,7 +557,7 @@ public class ContainerTest extends TestCase { Scope external = new DefaultScope(new ProvidedInterface[0]); external.publishInterface(provided, 100); - Scope scope = container.start(external); + container.start(external); } public void testProvidedInterfaces() { @@ -631,7 +635,7 @@ public class ContainerTest extends TestCase { 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()); }