org.jdesktop.test
Class TestUtils

java.lang.Object
  extended by junit.framework.Assert
      extended by org.jdesktop.test.TestUtils

public final class TestUtils
extends junit.framework.Assert

Extends assert to get all the ease-of-use assert methods

Author:
rbair

Method Summary
static void assertContainsType(Object[] objects, Class<?> clazz, int count)
           
static void assertPropertyChangeEvent(PropertyChangeReport report, Object source, String property, Object oldValue, Object newValue)
          Asserts the last received propertyChangeEvent of the report against the expected values.
static void assertPropertyChangeEvent(PropertyChangeReport report, String property, Object[] oldValue, Object[] newValue)
          Asserts the last received propertyChangeEvent of the report against the expected values (arrays).
static void assertPropertyChangeEvent(PropertyChangeReport report, String property, Object oldValue, Object newValue)
          Asserts the last received propertyChangeEvent of the report against the expected values.
static void assertPropertyChangeEvent(PropertyChangeReport report, String property, Object oldValue, Object newValue, boolean single)
          Asserts the last received propertyChangeEvent of the report against the expected values.
static void assertPropertyChangeEvent(PropertyChangeReport report, String property, Object oldValue, Object newValue, boolean single, boolean verifyArrayItems)
          Asserts the last received propertyChangeEvent of the report against the expected values.
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

assertContainsType

public static void assertContainsType(Object[] objects,
                                      Class<?> clazz,
                                      int count)

assertPropertyChangeEvent

public static void assertPropertyChangeEvent(PropertyChangeReport report,
                                             Object source,
                                             String property,
                                             Object oldValue,
                                             Object newValue)
Asserts the last received propertyChangeEvent of the report against the expected values.

Parameters:
report - the PropertyReport which received the event
source - the expected event source
property - the expected name of the property
oldValue - the expected old value
newValue - the expected new value

assertPropertyChangeEvent

public static void assertPropertyChangeEvent(PropertyChangeReport report,
                                             String property,
                                             Object oldValue,
                                             Object newValue)
Asserts the last received propertyChangeEvent of the report against the expected values.

Parameters:
report - the PropertyReport which received the event
property - the expected name of the property
oldValue - the expected old value
newValue - the expected new value

assertPropertyChangeEvent

public static void assertPropertyChangeEvent(PropertyChangeReport report,
                                             String property,
                                             Object oldValue,
                                             Object newValue,
                                             boolean single)
Asserts the last received propertyChangeEvent of the report against the expected values.

Parameters:
report - the PropertyReport which received the event
property - the expected name of the property
oldValue - the expected old value
newValue - the expected new value
single - flag to denote if we expect one event only

assertPropertyChangeEvent

public static void assertPropertyChangeEvent(PropertyChangeReport report,
                                             String property,
                                             Object oldValue,
                                             Object newValue,
                                             boolean single,
                                             boolean verifyArrayItems)
Asserts the last received propertyChangeEvent of the report against the expected values.

Parameters:
report - the PropertyReport which received the event
property - the expected name of the property
oldValue - the expected old value
newValue - the expected new value
single - flag to denote if we expect one event only
verifyArrayItems - check array items one by one rather then whole arrays

assertPropertyChangeEvent

public static void assertPropertyChangeEvent(PropertyChangeReport report,
                                             String property,
                                             Object[] oldValue,
                                             Object[] newValue)
Asserts the last received propertyChangeEvent of the report against the expected values (arrays).

Parameters:
report - the PropertyReport which received the event
property - the expected name of the property
oldValue - the expected old aray value
newValue - the expected new array value


Copyright © 2013. All Rights Reserved.