diff options
author | Ashlee Young <ashlee@onosfw.com> | 2015-10-09 18:32:44 -0700 |
---|---|---|
committer | Ashlee Young <ashlee@onosfw.com> | 2015-10-09 18:32:44 -0700 |
commit | 6a07d2d622eaa06953f3353e39c080984076e8de (patch) | |
tree | bfb50a2090fce186c2cc545a400c969bf2ea702b /framework/src/onos/utils/osgi | |
parent | e6d71622143ff9b2421a1abbe8434b954b5b1099 (diff) |
Updated master to commit id 6ee8aa3e67ce89908a8c93aa9445c6f71a18f986
Change-Id: I94b055ee2f298daf71e2ec794fd0f2495bd8081f
Diffstat (limited to 'framework/src/onos/utils/osgi')
-rw-r--r-- | framework/src/onos/utils/osgi/src/test/java/org/onlab/osgi/ComponentContextAdapter.java | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/framework/src/onos/utils/osgi/src/test/java/org/onlab/osgi/ComponentContextAdapter.java b/framework/src/onos/utils/osgi/src/test/java/org/onlab/osgi/ComponentContextAdapter.java index 0278ccd6..b8718c3c 100644 --- a/framework/src/onos/utils/osgi/src/test/java/org/onlab/osgi/ComponentContextAdapter.java +++ b/framework/src/onos/utils/osgi/src/test/java/org/onlab/osgi/ComponentContextAdapter.java @@ -22,14 +22,53 @@ import org.osgi.service.component.ComponentContext; import org.osgi.service.component.ComponentInstance; import java.util.Dictionary; +import java.util.Enumeration; /** * Adapter implementation of OSGI component context. */ public class ComponentContextAdapter implements ComponentContext { + private static class MockDictionary extends Dictionary { + + @Override + public int size() { + return 0; + } + + @Override + public boolean isEmpty() { + return false; + } + + @Override + public Enumeration keys() { + return null; + } + + @Override + public Enumeration elements() { + return null; + } + + @Override + public Object get(Object key) { + return null; + } + + @Override + public Object put(Object key, Object value) { + return null; + } + + @Override + public Object remove(Object key) { + return null; + } + } + @Override public Dictionary getProperties() { - return null; + return new MockDictionary(); } @Override |