Don't know where my commit message went. Here's what it was supposed to
be:
Fix remaining test case failures in BeanMap. Turns out these were
bad tests, rather than bugs in BeanMap.
regards,
michael
On 13 Mar 2002 [EMAIL PROTECTED] wrote:
> mas 02/03/12 20:59:03
>
> Modified: collections/src/test/org/apache/commons/collections
> TestBeanMap.java
> Log:
>
>
> Revision Changes Path
> 1.5 +27 -7
>jakarta-commons/collections/src/test/org/apache/commons/collections/TestBeanMap.java
>
> Index: TestBeanMap.java
> ===================================================================
> RCS file:
>/home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/TestBeanMap.java,v
> retrieving revision 1.4
> retrieving revision 1.5
> diff -u -r1.4 -r1.5
> --- TestBeanMap.java 13 Mar 2002 04:36:18 -0000 1.4
> +++ TestBeanMap.java 13 Mar 2002 04:59:03 -0000 1.5
> @@ -1,7 +1,7 @@
> /*
> - * $Header:
>/home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/TestBeanMap.java,v
> 1.4 2002/03/13 04:36:18 mas Exp $
> - * $Revision: 1.4 $
> - * $Date: 2002/03/13 04:36:18 $
> + * $Header:
>/home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/TestBeanMap.java,v
> 1.5 2002/03/13 04:59:03 mas Exp $
> + * $Revision: 1.5 $
> + * $Date: 2002/03/13 04:59:03 $
> *
> * ====================================================================
> *
> @@ -180,8 +180,7 @@
> someObject = value;
> }
> }
> -
> -
> +
> /*
> note to self. The Sample keys were generated by copying the field
> declarations and using the following regular expression search and replace:
> @@ -212,6 +211,14 @@
> return keys;
> }
>
> + /**
> + * An object value that will be stored in the bean map as a value. Need
> + * to save this externally so that we can make sure the object instances
> + * are equivalent since getSampleValues() would otherwise construct a new
> + * and different Object each time.
> + **/
> + private Object objectInFullMap = new Object();
> +
> /*
> note to self: the sample values were created manually
> */
> @@ -227,7 +234,7 @@
> new Character('a'),
> new Integer(1432),
> "SomeStringValue",
> - new Object(),
> + objectInFullMap,
> BeanWithProperties.class,
> };
> return values;
> @@ -260,7 +267,20 @@
> }
>
> public Map makeFullMap() {
> - return new BeanMap(new BeanWithProperties());
> + // note: These values must match (i.e. .equals() must return true)
> + // those returned from getSampleValues().
> + BeanWithProperties bean = new BeanWithProperties();
> + bean.setSomeIntValue(1234);
> + bean.setSomeLongValue(1298341928234L);
> + bean.setSomeDoubleValue(123423.34);
> + bean.setSomeFloatValue(1213332.12f);
> + bean.setSomeShortValue((short)134);
> + bean.setSomeByteValue((byte)10);
> + bean.setSomeCharValue('a');
> + bean.setSomeIntegerValue(new Integer(1432));
> + bean.setSomeStringValue("SomeStringValue");
> + bean.setSomeObjectValue(objectInFullMap);
> + return new BeanMap(bean);
> }
>
> public Map makeEmptyMap() {
>
>
>
>
> --
> To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>