com.darwinsys.testing
Class TestUtils

java.lang.Object
  extended by com.darwinsys.testing.TestUtils

public class TestUtils
extends java.lang.Object


Constructor Summary
TestUtils()
           
 
Method Summary
static void assertNoDefaultProperties(java.lang.Object o)
          A JUnit-like assertion method that uses reflection to ensure that no properties have default values; useful for testing (possibly large) Constructors to ensure that all properties are being set (and set correctly, e.g., gotta love those copy-and-paste errors in legacy constructors that are set by hand...).
static boolean equals(java.lang.Object o1, java.lang.Object o2)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestUtils

public TestUtils()
Method Detail

equals

public static boolean equals(java.lang.Object o1,
                             java.lang.Object o2)

assertNoDefaultProperties

public static void assertNoDefaultProperties(java.lang.Object o)
                                      throws java.lang.Exception
A JUnit-like assertion method that uses reflection to ensure that no properties have default values; useful for testing (possibly large) Constructors to ensure that all properties are being set (and set correctly, e.g., gotta love those copy-and-paste errors in legacy constructors that are set by hand...).

Parameters:
o - The object (of any type) to be tested.
Throws:
java.lang.Exception


Copyright © 1996-2004 Ian F. Darwin. See license.html for usage license.