Save This Page
Home » commons-lang-2.4-src » org.apache.commons » lang » builder » [javadoc | source]
org.apache.commons.lang.builder
public class: ToStringBuilderTest [javadoc | source]
java.lang.Object
   junit.framework.TestCase
      org.apache.commons.lang.builder.ToStringBuilderTest
Unit tests for org.apache.commons.lang.builder.ToStringBuilder .
Nested Class Summary:
static class  ToStringBuilderTest.ReflectionTestFixtureA   
static class  ToStringBuilderTest.ReflectionTestFixtureB   
static class  ToStringBuilderTest.Outer   
static class  ToStringBuilderTest.ReflectionTestCycleA  A reflection test fixture. 
static class  ToStringBuilderTest.ReflectionTestCycleB  A reflection test fixture. 
static class  ToStringBuilderTest.SimpleReflectionTestFixture  A reflection test fixture. 
class  ToStringBuilderTest.ReflectionStaticFieldsFixture  Tests ReflectionToStringBuilder.toString() for statics. 
class  ToStringBuilderTest.SimpleReflectionStaticFieldsFixture  Test fixture for ReflectionToStringBuilder.toString() for statics. 
class  ToStringBuilderTest.InheritedReflectionStaticFieldsFixture  Test fixture for ReflectionToStringBuilder.toString() for statics. 
Constructor:
 public ToStringBuilderTest(String name) 
Method from org.apache.commons.lang.builder.ToStringBuilderTest Summary:
assertReflectionArray,   main,   setUp,   suite,   tearDown,   testAppendSuper,   testAppendToString,   testBlank,   testBoolean,   testBooleanArray,   testBooleanArrayArray,   testByte,   testByteArray,   testByteArrayArray,   testChar,   testCharArray,   testCharArrayArray,   testConstructorEx1,   testConstructorEx2,   testConstructorEx3,   testDouble,   testDoubleArray,   testDoubleArrayArray,   testFloat,   testFloatArray,   testFloatArrayArray,   testGetSetDefault,   testInheritedReflectionStatics,   testInnerClassReflection,   testInt,   testIntArray,   testIntArrayArray,   testLong,   testLongArray,   testLongArrayArray,   testObject,   testObjectArray,   testReflectionArrayAndObjectCycle,   testReflectionArrayArrayCycle,   testReflectionArrayCycle,   testReflectionArrayCycleLevel2,   testReflectionBoolean,   testReflectionBooleanArray,   testReflectionBooleanArrayArray,   testReflectionByteArrayArray,   testReflectionCharArray,   testReflectionCharArrayArray,   testReflectionCharacter,   testReflectionDoubleArray,   testReflectionDoubleArrayArray,   testReflectionFloatArray,   testReflectionFloatArrayArray,   testReflectionHierarchy,   testReflectionHierarchyArrayList,   testReflectionIntArray,   testReflectionIntArrayArray,   testReflectionInteger,   testReflectionLongArray,   testReflectionLongArrayArray,   testReflectionNull,   testReflectionObjectArray,   testReflectionObjectCycle,   testReflectionShortArray,   testReflectionStatics,   testReflectionhortArrayArray,   testReflectionyteArray,   testSelfInstanceTwoVarsReflectionObjectCycle,   testSelfInstanceVarReflectionObjectCycle,   testSetDefaultEx,   testShort,   testShortArray,   testShortArrayArray,   testSimpleReflectionObjectCycle,   testSimpleReflectionStatics,   toStringWithStatics,   validateEmptyReflectionRegistry
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.commons.lang.builder.ToStringBuilderTest Detail:
 public  void assertReflectionArray(String expected,
    Object actual) 
 public static  void main(String[] args) 
 protected  void setUp() throws Exception 
 public static Test suite() 
 protected  void tearDown() throws Exception 
 public  void testAppendSuper() 
 public  void testAppendToString() 
 public  void testBlank() 
 public  void testBoolean() 
 public  void testBooleanArray() 
 public  void testBooleanArrayArray() 
 public  void testByte() 
 public  void testByteArray() 
 public  void testByteArrayArray() 
 public  void testChar() 
 public  void testCharArray() 
 public  void testCharArrayArray() 
 public  void testConstructorEx1() 
 public  void testConstructorEx2() 
 public  void testConstructorEx3() 
 public  void testDouble() 
 public  void testDoubleArray() 
 public  void testDoubleArrayArray() 
 public  void testFloat() 
 public  void testFloatArray() 
 public  void testFloatArrayArray() 
 public  void testGetSetDefault() 
 public  void testInheritedReflectionStatics() 
    Tests ReflectionToStringBuilder.toString() for statics.
 public  void testInnerClassReflection() 
 public  void testInt() 
 public  void testIntArray() 
 public  void testIntArrayArray() 
 public  void testLong() 
 public  void testLongArray() 
 public  void testLongArrayArray() 
 public  void testObject() 
 public  void testObjectArray() 
 public  void testReflectionArrayAndObjectCycle() throws Exception 
    Test a nasty combination of arrays and Objects pointing to each other. objects[0] -> SimpleReflectionTestFixture[ o -> objects ]
 public  void testReflectionArrayArrayCycle() throws Exception 
 public  void testReflectionArrayCycle() throws Exception 
    Test an array element pointing to its container.
 public  void testReflectionArrayCycleLevel2() throws Exception 
    Test an array element pointing to its container.
 public  void testReflectionBoolean() 
    Test wrapper for char boolean.
 public  void testReflectionBooleanArray() 
 public  void testReflectionBooleanArrayArray() 
 public  void testReflectionByteArrayArray() 
 public  void testReflectionCharArray() 
 public  void testReflectionCharArrayArray() 
 public  void testReflectionCharacter() 
    Test wrapper for char primitive.
 public  void testReflectionDoubleArray() 
 public  void testReflectionDoubleArrayArray() 
 public  void testReflectionFloatArray() 
 public  void testReflectionFloatArrayArray() 
 public  void testReflectionHierarchy() 
 public  void testReflectionHierarchyArrayList() 
 public  void testReflectionIntArray() 
 public  void testReflectionIntArrayArray() 
 public  void testReflectionInteger() 
    Test wrapper for int primitive.
 public  void testReflectionLongArray() 
 public  void testReflectionLongArrayArray() 
 public  void testReflectionNull() 
 public  void testReflectionObjectArray() 
 public  void testReflectionObjectCycle() throws Exception 
    Test Objects pointing to each other.
 public  void testReflectionShortArray() 
 public  void testReflectionStatics() 
    Tests ReflectionToStringBuilder.toString() for statics.
 public  void testReflectionhortArrayArray() 
 public  void testReflectionyteArray() 
 public  void testSelfInstanceTwoVarsReflectionObjectCycle() throws Exception 
    Test a class that defines an ivar pointing to itself. This test was created to show that handling cyclical object resulted in a missing endFieldSeparator call.
 public  void testSelfInstanceVarReflectionObjectCycle() throws Exception 
    Test a class that defines an ivar pointing to itself.
 public  void testSetDefaultEx() 
 public  void testShort() 
 public  void testShortArray() 
 public  void testShortArrayArray() 
 public  void testSimpleReflectionObjectCycle() throws Exception 
    Test an Object pointing to itself, the simplest test.
 public  void testSimpleReflectionStatics() 
 public Object toStringWithStatics(Object object,
    ToStringStyle style,
    Class reflectUpToClass) 

    This method uses reflection to build a suitable toString value which includes static fields.

    It uses AccessibleObject.setAccessible to gain access to private fields. This means that it will throw a security exception if run under a security manager, if the permissions are not set up correctly. It is also not as efficient as testing explicitly.

    Transient fields are not output.

    Superclass fields will be appended up to and including the specified superclass. A null superclass is treated as java.lang.Object.

    If the style is null, the default ToStringStyle is used.

  void validateEmptyReflectionRegistry()