import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.wamblee.collections.CollectionFilter;
+import org.wamblee.conditions.Condition;
import org.wamblee.general.Pair;
/**
private Set<String> _componentNames;
private CompositeInterfaceRestriction _restriction;
private boolean _sealed;
-
-
- public static ProvidedInterface[] filterProvidedServices(
+
+ static ProvidedInterface[] filterProvidedServices(
Component aClient, RequiredInterface aRequired, Collection<Pair<ProvidedInterface,Component>> aProvided,
InterfaceRestriction aRestriction) {
List<ProvidedInterface> result = new ArrayList<ProvidedInterface>();
new DefaultRequiredInterface("a", new Class[]{ String.class, Integer.class})));
}
+
+ public void testCopy() {
+ DefaultRequiredInterface required = new DefaultRequiredInterface("a", new Class[]{ String.class, Integer.class}, true);
+ RequiredInterface copy = required.copy();
+ assertTrue(copy instanceof DefaultRequiredInterface);
+ assertEquals(required.getName(), copy.getName());
+ assertEquals(required.isOptional(), copy.isOptional());
+ assertEquals(required.toString(), copy.toString());
+ }
}