harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r472907 - /incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/SimpleBeanInfoTest.java
Date Thu, 09 Nov 2006 14:21:07 GMT
Author: ayza
Date: Thu Nov  9 06:21:07 2006
New Revision: 472907

URL: http://svn.apache.org/viewvc?view=rev&rev=472907
Log:
applying patch from HARMONY-1903 ([tests][beans]org.apache.harmony.beans.tests.java.beans.SimpleBeanInfoTest.testLoadImage()
test is commented.)

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/SimpleBeanInfoTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/SimpleBeanInfoTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/SimpleBeanInfoTest.java?view=diff&rev=472907&r1=472906&r2=472907
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/SimpleBeanInfoTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/SimpleBeanInfoTest.java
Thu Nov  9 06:21:07 2006
@@ -17,11 +17,13 @@
 
 package org.apache.harmony.beans.tests.java.beans;
 
+import java.awt.Image;
 import java.beans.BeanInfo;
 import java.beans.SimpleBeanInfo;
 
 import junit.framework.TestCase;
 
+
 /**
  * Unit test for SimpleBeanInfo
  */
@@ -29,54 +31,62 @@
 
     public void testGetAdditionalBeanInfo() {
         SimpleBeanInfo info = new SimpleBeanInfo();
+
         assertNull(info.getAdditionalBeanInfo());
     }
 
     public void testGetBeanDescriptor() {
         SimpleBeanInfo info = new SimpleBeanInfo();
+
         assertNull(info.getBeanDescriptor());
     }
 
     public void testGetDefaultEventIndex() {
         SimpleBeanInfo info = new SimpleBeanInfo();
+
         assertEquals(-1, info.getDefaultEventIndex());
     }
 
     public void testGetDefaultPropertyIndex() {
         SimpleBeanInfo info = new SimpleBeanInfo();
+
         assertEquals(-1, info.getDefaultPropertyIndex());
     }
 
     public void testGetEventSetDescriptors() {
         SimpleBeanInfo info = new SimpleBeanInfo();
+
         assertNull(info.getEventSetDescriptors());
     }
 
     public void testGetIcon() {
         SimpleBeanInfo info = new SimpleBeanInfo();
+
         assertNull(info.getIcon(BeanInfo.ICON_COLOR_16x16));
     }
 
     public void testGetMethodDescriptors() {
         SimpleBeanInfo info = new SimpleBeanInfo();
+        
         assertNull(info.getMethodDescriptors());
     }
 
     public void testGetPropertyDescriptors() {
         SimpleBeanInfo info = new SimpleBeanInfo();
+
         assertNull(info.getPropertyDescriptors());
     }
 
-    // Depends on AWT functionality that is currently stubbed out.
-    // public void testLoadImage() {
-    // // TODO The bahavior is not implemented
-    // MockSimpleBeanInfo info = new MockSimpleBeanInfo();
-    // Image image = info.loadImage("/gif/harmony-logo.gif");
-    // // assertTrue(image instanceof Image);
-    //
-    // // TODO The bahavior is not implemented
-    // SimpleBeanInfo sbi = new SimpleBeanInfo();
-    // image = sbi.loadImage("/gif/test.gif");
-    // // assertNotNull(image);
-    // }
+    public void testLoadImage() {
+        SimpleBeanInfo info = new SimpleBeanInfo();
+        Image image;
+        
+        image = info.loadImage("/gif/harmony-logo.gif");
+        assertNotNull(image);
+        assertTrue(image instanceof Image);
+    
+        image = info.loadImage("/gif/test.gif");
+        assertNotNull(image);
+        assertTrue(image instanceof Image);
+    }
 }



Mime
View raw message