aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From timothyjw...@apache.org
Subject svn commit: r1453790 - /aries/trunk/util/util-r42/src/test/java/org/apache/aries/util/SingleServiceTrackerTest.java
Date Thu, 07 Mar 2013 11:55:09 GMT
Author: timothyjward
Date: Thu Mar  7 11:55:08 2013
New Revision: 1453790

URL: http://svn.apache.org/r1453790
Log:
ARIES-1024 : Add an extra test for filtered SingleServiceTracker

Modified:
    aries/trunk/util/util-r42/src/test/java/org/apache/aries/util/SingleServiceTrackerTest.java

Modified: aries/trunk/util/util-r42/src/test/java/org/apache/aries/util/SingleServiceTrackerTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/util/util-r42/src/test/java/org/apache/aries/util/SingleServiceTrackerTest.java?rev=1453790&r1=1453789&r2=1453790&view=diff
==============================================================================
--- aries/trunk/util/util-r42/src/test/java/org/apache/aries/util/SingleServiceTrackerTest.java
(original)
+++ aries/trunk/util/util-r42/src/test/java/org/apache/aries/util/SingleServiceTrackerTest.java
Thu Mar  7 11:55:08 2013
@@ -136,6 +136,23 @@ public class SingleServiceTrackerTest {
   }
   
   @Test
+  public void testAfterTheFactChoiceWithPropertiesAndFilterWithSecondMatch() {
+	  
+	  createSut("(foo=bar)");
+	  Skeleton.getSkeleton(listener).assertSkeletonNotCalled();
+	  
+	  ctx.registerService("java.lang.String", "uno", null);
+	  Skeleton.getSkeleton(listener).assertSkeletonNotCalled();
+
+	  Dictionary<String, String> props = new Hashtable<String, String>();
+	  props.put("foo", "bar");
+	  ctx.registerService("java.lang.String", "due", props);
+	  
+	  Skeleton.getSkeleton(listener).assertCalled(Arrays.asList(new MethodCall(SingleServiceListener.class,
"serviceFound")), true);
+	  assertEquals("due", sut.getService());
+  }
+  
+  @Test
   public void testRegistrationWhileClosed() {
     createSut();
     sut.close();



Mime
View raw message