commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scolebou...@apache.org
Subject cvs commit: jakarta-commons/lang/src/test/org/apache/commons/lang/enum EnumTest.java
Date Thu, 12 Feb 2004 01:00:05 GMT
scolebourne    2004/02/11 17:00:05

  Modified:    lang/src/test/org/apache/commons/lang/enum EnumTest.java
  Log:
  Improve tests to check result of enum equals
  
  Revision  Changes    Path
  1.14      +6 -6      jakarta-commons/lang/src/test/org/apache/commons/lang/enum/EnumTest.java
  
  Index: EnumTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/lang/src/test/org/apache/commons/lang/enum/EnumTest.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- EnumTest.java	12 Feb 2004 00:45:09 -0000	1.13
  +++ EnumTest.java	12 Feb 2004 01:00:05 -0000	1.14
  @@ -55,7 +55,6 @@
   
   import java.lang.reflect.InvocationTargetException;
   import java.lang.reflect.Method;
  -import java.net.URL;
   import java.net.URLClassLoader;
   import java.util.ArrayList;
   import java.util.HashMap;
  @@ -66,6 +65,7 @@
   import junit.framework.Test;
   import junit.framework.TestCase;
   import junit.framework.TestSuite;
  +
   import org.apache.commons.lang.SerializationUtils;
   
   /**
  @@ -501,9 +501,9 @@
       }
       
       public void testEqualsToWrongInstance() {
  -        ColorEnum.RED.equals("test");
  -        ColorEnum.RED.equals(new Integer(1));
  -        ColorEnum.RED.equals(new Boolean(true));
  -        ColorEnum.RED.equals(new StringBuffer("test"));
  +        assertEquals(false, ColorEnum.RED.equals("test"));
  +        assertEquals(false, ColorEnum.RED.equals(new Integer(1)));
  +        assertEquals(false, ColorEnum.RED.equals(new Boolean(true)));
  +        assertEquals(false, ColorEnum.RED.equals(new StringBuffer("test")));
       }
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message