From: Vincent M. <vm...@oc...> - 2002-11-04 20:45:12
|
[snip] > > > I also think that the default return value for the String class should > > be null and not "", as null is what anyone expects when an object has > > not been defined. Thus, I find myself adding: > > > > mock.setupDefaultResult(String.class, null); > > > > in the setUp() methods of lots of my test cases. > > > > What do you think? > > surely that would apply to any return type, not just strings? Are your > test > for getting property values back? There are already default results for lots of types. I think the default values should the ones defined by the JVM specification (which is null for Objects). Yes, my tests are for getting HTTP parameters (getParameter()). Thanks -Vincent |