harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r463609 - in /incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans: ./ beancontext/
Date Fri, 13 Oct 2006 09:50:58 GMT
Author: hindessm
Date: Fri Oct 13 02:50:57 2006
New Revision: 463609

URL: http://svn.apache.org/viewvc?view=rev&rev=463609
Log:
Converting things like:

  assertTrue(blah == [true|false|null]) to assert[True|False|Null]
  assertEquals(blah, [true,false,null]) to assert[True|False|Null]
  assertEquals([true,false,null], blah) to assert[True|False|Null]

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/DefaultPersistenceDelegateTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/ExpressionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/IndexedPropertyDescriptorTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/PropertyChangeEventTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/PropertyEditorSupportTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/StatementTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/XMLDecoderTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServiceRevokedEventTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/DefaultPersistenceDelegateTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/DefaultPersistenceDelegateTest.java?view=diff&rev=463609&r1=463608&r2=463609
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/DefaultPersistenceDelegateTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/DefaultPersistenceDelegateTest.java
Fri Oct 13 02:50:57 2006
@@ -353,7 +353,7 @@
         assertEquals("new", e.getMethodName());
         assertEquals(2, e.getArguments().length);
         assertEquals(new Integer(2), e.getArguments()[0]);
-        assertEquals(null, e.getArguments()[1]);
+        assertNull(e.getArguments()[1]);
     }
 
     /*
@@ -475,7 +475,7 @@
         assertEquals(0, exp.getArguments().length);
 
         // should have called get()
-        assertEquals(null, CallVerificationStack.getInstance().pop());
+        assertNull(CallVerificationStack.getInstance().pop());
 
         // should have called writeExpression()
         exp = (Expression) CallVerificationStack.getInstance().pop();
@@ -546,7 +546,7 @@
         assertEquals(0, exp.getArguments().length);
 
         // should have called get()
-        assertEquals(null, CallVerificationStack.getInstance().pop());
+        assertNull(CallVerificationStack.getInstance().pop());
 
         // should have called writeExpression()
         exp = (Expression) CallVerificationStack.getInstance().pop();

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/ExpressionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/ExpressionTest.java?view=diff&rev=463609&r1=463608&r2=463609
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/ExpressionTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/ExpressionTest.java
Fri Oct 13 02:50:57 2006
@@ -703,7 +703,7 @@
     public void testGetValue_UnboundedAmbitiousStaticMethod() throws Exception {
         Object[] arguments = new Object[] { "test" };
         Expression t = new Expression(MockObject.class, "forName", arguments);
-        assertEquals(null, t.getValue());
+        assertNull(t.getValue());
         MockObject.assertCalled("forName", arguments);
 
         t = new Expression(String.class, "forName",
@@ -1068,7 +1068,7 @@
         }
 
         public static void assertNotCalled() {
-            assertEquals(null, calledMethod);
+            assertNull(calledMethod);
             assertTrue(receivedArguments.isEmpty());
         }
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/IndexedPropertyDescriptorTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/IndexedPropertyDescriptorTest.java?view=diff&rev=463609&r1=463608&r2=463609
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/IndexedPropertyDescriptorTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/IndexedPropertyDescriptorTest.java
Fri Oct 13 02:50:57 2006
@@ -645,8 +645,8 @@
         Class beanClass = MockJavaBean.class;
         IndexedPropertyDescriptor ipd = new IndexedPropertyDescriptor(
                 propertyName, beanClass, null, null, null, null);
-        assertEquals(null, ipd.getIndexedPropertyType());
-        assertEquals(null, ipd.getPropertyType());
+        assertNull(ipd.getIndexedPropertyType());
+        assertNull(ipd.getPropertyType());
         assertNull(ipd.getReadMethod());
         assertNull(ipd.getIndexedReadMethod());
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/PropertyChangeEventTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/PropertyChangeEventTest.java?view=diff&rev=463609&r1=463608&r2=463609
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/PropertyChangeEventTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/PropertyChangeEventTest.java
Fri Oct 13 02:50:57 2006
@@ -54,7 +54,7 @@
         PropertyChangeEvent event = new PropertyChangeEvent(src, null, null,
                 null);
         assertSame(src, event.getSource());
-        assertEquals(null, event.getPropertyName());
+        assertNull(event.getPropertyName());
         assertSame(null, event.getOldValue());
         assertSame(null, event.getNewValue());
         assertNull(event.getPropagationId());
@@ -71,7 +71,7 @@
         PropertyChangeEvent event = new PropertyChangeEvent(src, null,
                 oldValue, newValue);
         assertSame(src, event.getSource());
-        assertEquals(null, event.getPropertyName());
+        assertNull(event.getPropertyName());
         assertSame(oldValue, event.getOldValue());
         assertSame(newValue, event.getNewValue());
         assertNull(event.getPropagationId());

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/PropertyEditorSupportTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/PropertyEditorSupportTest.java?view=diff&rev=463609&r1=463608&r2=463609
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/PropertyEditorSupportTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/PropertyEditorSupportTest.java
Fri Oct 13 02:50:57 2006
@@ -252,7 +252,7 @@
         PropertyEditorSupport support = new PropertyEditorSupport();
         support.setValue(null);
 
-        assertEquals(null, support.getValue());
+        assertNull(support.getValue());
         assertEquals("null", support.getAsText());
 
         assertNull(support.getCustomEditor());

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/StatementTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/StatementTest.java?view=diff&rev=463609&r1=463608&r2=463609
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/StatementTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/StatementTest.java
Fri Oct 13 02:50:57 2006
@@ -1043,7 +1043,7 @@
         }
 
         public static void assertNotCalled() {
-            assertEquals(null, calledMethod);
+            assertNull(calledMethod);
             assertTrue(receivedArguments.isEmpty());
         }
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/XMLDecoderTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/XMLDecoderTest.java?view=diff&rev=463609&r1=463608&r2=463609
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/XMLDecoderTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/XMLDecoderTest.java
Fri Oct 13 02:50:57 2006
@@ -193,7 +193,7 @@
         assertEquals(127, b.getB());
         assertSame(b, b.getBackRef());
         assertEquals(new Byte((byte) 127), b.getBobj());
-        assertEquals(false, b.isBool());
+        assertFalse(b.isBool());
         assertEquals(Boolean.TRUE, b.getBoolobj());
         assertEquals(Exception.class, b.getBornFriend().getClazz());
         assertEquals(888, b.getBornFriend().getZarr()[0]);

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServiceRevokedEventTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServiceRevokedEventTest.java?view=diff&rev=463609&r1=463608&r2=463609
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServiceRevokedEventTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServiceRevokedEventTest.java
Fri Oct 13 02:50:57 2006
@@ -74,7 +74,7 @@
         assertNull(event.getServiceClass());
         assertSame(services, event.getSource());
         assertSame(services, event.getSourceAsBeanContextServices());
-        assertEquals(true, event.isCurrentServiceInvalidNow());
+        assertTrue(event.isCurrentServiceInvalidNow());
         try {
             event.isServiceClass(Integer.class);
             fail("NPE expected");
@@ -90,7 +90,7 @@
         assertSame(BeanContext.class, event.getServiceClass());
         assertSame(services, event.getSource());
         assertSame(services, event.getSourceAsBeanContextServices());
-        assertEquals(true, event.isCurrentServiceInvalidNow());
+        assertTrue(event.isCurrentServiceInvalidNow());
     }
 
     public void testGetSourceAsBeanContextServices() {
@@ -123,10 +123,10 @@
         BeanContextServices services = new MockBeanContextServices();
         BeanContextServiceRevokedEvent event = new MockBeanContextServiceRevokedEvent(
                 services, BeanContext.class, true);
-        assertEquals(true, event.isCurrentServiceInvalidNow());
+        assertTrue(event.isCurrentServiceInvalidNow());
         event = new MockBeanContextServiceRevokedEvent(services,
                 BeanContext.class, false);
-        assertEquals(false, event.isCurrentServiceInvalidNow());
+        assertFalse(event.isCurrentServiceInvalidNow());
     }
 
     public void testSerialization() throws IOException, ClassNotFoundException {



Mime
View raw message