felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r1301564 - /felix/trunk/fileinstall/src/test/java/org/apache/felix/fileinstall/internal/ConfigInstallerTest.java
Date Fri, 16 Mar 2012 14:53:24 GMT
Author: gnodet
Date: Fri Mar 16 14:53:23 2012
New Revision: 1301564

URL: http://svn.apache.org/viewvc?rev=1301564&view=rev
Log:
[FELIX-2763] Fix unit test compilation

Modified:
    felix/trunk/fileinstall/src/test/java/org/apache/felix/fileinstall/internal/ConfigInstallerTest.java

Modified: felix/trunk/fileinstall/src/test/java/org/apache/felix/fileinstall/internal/ConfigInstallerTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/fileinstall/src/test/java/org/apache/felix/fileinstall/internal/ConfigInstallerTest.java?rev=1301564&r1=1301563&r2=1301564&view=diff
==============================================================================
--- felix/trunk/fileinstall/src/test/java/org/apache/felix/fileinstall/internal/ConfigInstallerTest.java
(original)
+++ felix/trunk/fileinstall/src/test/java/org/apache/felix/fileinstall/internal/ConfigInstallerTest.java
Fri Mar 16 14:53:23 2012
@@ -168,19 +168,19 @@ public class ConfigInstallerTest extends
     
     public void testShouldSaveConfig() 
     {
-        final AtomicReference<Boolean> disable = new AtomicReference<Boolean>();
-        final AtomicReference<Boolean> enable = new AtomicReference<Boolean>();
+        final AtomicReference disable = new AtomicReference();
+        final AtomicReference enable = new AtomicReference();
         
         EasyMock.expect(mockBundleContext.getProperty(DirectoryWatcher.DISABLE_CONFIG_SAVE)).andAnswer(
-                new IAnswer<String>() {
-                    public String answer() throws Throwable {
+                new IAnswer() {
+                    public Object answer() throws Throwable {
                         return disable.get() != null ? disable.get().toString() : null;
                     }
                 }
         ).anyTimes();
         EasyMock.expect(mockBundleContext.getProperty(DirectoryWatcher.ENABLE_CONFIG_SAVE)).andAnswer(
-                new IAnswer<String>() {
-                    public String answer() throws Throwable {
+                new IAnswer() {
+                    public Object answer() throws Throwable {
                         return enable.get() != null ? enable.get().toString() : null;
                     }
                 }
@@ -193,36 +193,36 @@ public class ConfigInstallerTest extends
         enable.set(null);
         assertTrue( ci.shouldSaveConfig() );
 
-        disable.set(false);
+        disable.set(Boolean.FALSE);
         enable.set(null);
         assertFalse( ci.shouldSaveConfig() );
 
-        disable.set(true);
+        disable.set(Boolean.TRUE);
         enable.set(null);
         assertTrue( ci.shouldSaveConfig() );
 
         disable.set(null);
-        enable.set(false);
+        enable.set(Boolean.FALSE);
         assertFalse( ci.shouldSaveConfig() );
 
-        disable.set(false);
-        enable.set(false);
+        disable.set(Boolean.FALSE);
+        enable.set(Boolean.FALSE);
         assertFalse( ci.shouldSaveConfig() );
 
-        disable.set(true);
-        enable.set(false);
+        disable.set(Boolean.TRUE);
+        enable.set(Boolean.FALSE);
         assertFalse( ci.shouldSaveConfig() );
 
         disable.set(null);
-        enable.set(true);
+        enable.set(Boolean.TRUE);
         assertTrue( ci.shouldSaveConfig() );
 
-        disable.set(false);
-        enable.set(true);
+        disable.set(Boolean.FALSE);
+        enable.set(Boolean.TRUE);
         assertTrue( ci.shouldSaveConfig() );
 
-        disable.set(true);
-        enable.set(true);
+        disable.set(Boolean.TRUE);
+        enable.set(Boolean.TRUE);
         assertTrue( ci.shouldSaveConfig() );
 
         EasyMock.verify(new Object[]{mockConfiguration, mockConfigurationAdmin, mockBundleContext});



Mime
View raw message