summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Campo2008-02-21 12:20:10 (EST)
committerChristian Campo2008-02-21 12:20:10 (EST)
commit0019c5fcb51e92f10f6dfacab8a188d6dbbaae16 (patch)
tree834e83133cdd4d908d6d954221f2924d21165804
parent94890d4b17b67619bbc1fe66ea8204e741b4eb0a (diff)
downloadorg.eclipse.riena-0019c5fcb51e92f10f6dfacab8a188d6dbbaae16.zip
org.eclipse.riena-0019c5fcb51e92f10f6dfacab8a188d6dbbaae16.tar.gz
org.eclipse.riena-0019c5fcb51e92f10f6dfacab8a188d6dbbaae16.tar.bz2
added filter test which is currently not working
-rw-r--r--org.eclipse.riena.tests/src/org/eclipse/riena/core/service/InjectorTest.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/org.eclipse.riena.tests/src/org/eclipse/riena/core/service/InjectorTest.java b/org.eclipse.riena.tests/src/org/eclipse/riena/core/service/InjectorTest.java
index 4e593ee..fb2b16b 100644
--- a/org.eclipse.riena.tests/src/org/eclipse/riena/core/service/InjectorTest.java
+++ b/org.eclipse.riena.tests/src/org/eclipse/riena/core/service/InjectorTest.java
@@ -219,4 +219,22 @@ public class InjectorTest extends TestCase {
reg.unregister();
}
+
+ public void testFilterTest() {
+ System.out.println("testFilterTest");
+ Target target = new Target();
+
+ DepOne depOne = new DepOneOne();
+ Hashtable<String, String> ht = new Hashtable<String, String>();
+ ht.put("x", "y");
+ ServiceRegistration reg = context.registerService(DepOne.class.getName(), depOne, ht);
+
+ Injector shot = new ServiceId(DepOne.class.getName()).useFilter("(x=y)").injectInto(target).andStart(context);
+ assertEquals(1, target.count("bind", DepOneOne.class));
+
+ shot.stop();
+ assertEquals(0, target.count("bind", DepOneOne.class));
+
+ reg.unregister();
+ }
}