harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndbe...@apache.org
Subject svn commit: r481897 - in /harmony/enhanced/classlib/trunk/modules/beans/src: main/java/java/beans/Beans.java test/java/org/apache/harmony/beans/tests/java/beans/BeansTest.java
Date Sun, 03 Dec 2006 21:19:21 GMT
Author: ndbeyer
Date: Sun Dec  3 13:19:20 2006
New Revision: 481897

URL: http://svn.apache.org/viewvc?view=rev&rev=481897
Log:
Apply modified patch for HARMONY-2389: [classlib] [beans] Method isGuiAvailable() in class
Beans returns false by default

Modified:
    harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/Beans.java
    harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/BeansTest.java

Modified: harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/Beans.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/Beans.java?view=diff&rev=481897&r1=481896&r2=481897
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/Beans.java (original)
+++ harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/Beans.java Sun
Dec  3 13:19:20 2006
@@ -28,7 +28,7 @@
 
     private static boolean designTime = false;
 
-    private static boolean guiAvailable = false;
+    private static boolean guiAvailable = true;
 
     public Beans() {
     }

Modified: harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/BeansTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/BeansTest.java?view=diff&rev=481897&r1=481896&r2=481897
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/BeansTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/BeansTest.java
Sun Dec  3 13:19:20 2006
@@ -337,24 +337,34 @@
         assertFalse(Beans.isInstanceOf(bean, String.class));
     }
 
-    public void testSetDesignTime_true() {
-        Beans.setDesignTime(true);
-        assertTrue(Beans.isDesignTime());
+    public void testSetDesignTime() {
+        boolean value = Beans.isDesignTime();
+        try {
+            Beans.setDesignTime(true);
+            assertTrue(Beans.isDesignTime());
+            
+            Beans.setDesignTime(false);
+            assertFalse(Beans.isDesignTime());
+        } finally {
+            Beans.setDesignTime(value);
+        }
     }
 
-    public void testSetDesignTime_false() {
-        Beans.setDesignTime(false);
-        assertFalse(Beans.isDesignTime());
+    public void testSetGuiAvailable() {
+        boolean value = Beans.isGuiAvailable();
+        try {
+            Beans.setGuiAvailable(true);
+            assertTrue(Beans.isGuiAvailable());
+            
+            Beans.setGuiAvailable(false);
+            assertFalse(Beans.isGuiAvailable());
+        } finally {
+            Beans.setGuiAvailable(value);
+        }
     }
-
-    public void testSetGuiAvailable_true() {
-        Beans.setGuiAvailable(true);
-        assertTrue(Beans.isGuiAvailable());
-    }
-
-    public void testSetGuiAvailable_false() {
-        Beans.setGuiAvailable(false);
-        assertFalse(Beans.isGuiAvailable());
+    
+    public void testIsGuiAvailableDefault() {
+        assertTrue("GUI is available by default", Beans.isGuiAvailable()); 
     }
 
     /**



Mime
View raw message