org.lambico.test.spring
Class EnhancedTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.springframework.test.ConditionalTestCase
              extended by org.springframework.test.AbstractSpringContextTests
                  extended by org.springframework.test.AbstractSingleSpringContextTests
                      extended by org.springframework.test.AbstractDependencyInjectionSpringContextTests
                          extended by org.springframework.test.AbstractTransactionalSpringContextTests
                              extended by org.springframework.test.AbstractTransactionalDataSourceSpringContextTests
                                  extended by org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests
                                      extended by org.lambico.test.spring.EnhancedTestCase
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
DBTest

public abstract class EnhancedTestCase
extends org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests

Adds useful assertions to the standard JUnit TestCase.


Field Summary
 
Fields inherited from class org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests
profileValueSource, simpleJdbcTemplate
 
Fields inherited from class org.springframework.test.AbstractTransactionalDataSourceSpringContextTests
jdbcTemplate
 
Fields inherited from class org.springframework.test.AbstractTransactionalSpringContextTests
transactionDefinition, transactionManager, transactionStatus
 
Fields inherited from class org.springframework.test.AbstractDependencyInjectionSpringContextTests
AUTOWIRE_BY_NAME, AUTOWIRE_BY_TYPE, AUTOWIRE_NO
 
Fields inherited from class org.springframework.test.AbstractSingleSpringContextTests
applicationContext
 
Fields inherited from class org.springframework.test.ConditionalTestCase
logger
 
Constructor Summary
EnhancedTestCase()
           
 
Method Summary
static void assertEmpty(java.util.Collection c)
          Assert the emptyness of a Collection.
static void assertEquals(byte[] expected, byte[] actual)
          Assert equality between two arrays of bytes.
static void assertEquals(double[] expected, double[] actual)
          Assert equality between two arrays of doubles.
static void assertEquals(java.lang.String description, byte[] expected, byte[] actual)
          Assert equality between two arrays of bytes.
static void assertEquals(java.lang.String description, double[] expected, double[] actual)
          Assert equality between two arrays of doubles.
static void assertEqualsIgnoreCase(java.lang.String expected, java.lang.String actual)
          Assert equality of two strings, ignoring the case.
static void assertNotEmpty(java.util.Collection c)
          Assert the not emptyness of a Collection.
static void assertNotEmpty(java.lang.Object[] array)
          Assert the not emptyness of an array of Objects.
static void assertNotEmpty(java.lang.String message, java.util.Collection c)
          Assert the not emptyness of a Collection.
static void assertNotEmpty(java.lang.String message, java.lang.Object[] array)
          Assert the not emptyness of an array of Objects.
static void assertSize(int size, java.util.Collection c)
          Assert the size of a Collection.
 
Methods inherited from class org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests
findUniqueProfileValueSourceFromContext, getTestMethod, isDisabledInThisEnvironment, isRollback, runBare, setDataSource
 
Methods inherited from class org.springframework.test.AbstractTransactionalDataSourceSpringContextTests
countRowsInTable, deleteFromTables, executeSqlScript, getJdbcTemplate, setComplete, setSqlScriptEncoding
 
Methods inherited from class org.springframework.test.AbstractTransactionalSpringContextTests
endTransaction, isDefaultRollback, onSetUp, onSetUpBeforeTransaction, onSetUpInTransaction, onTearDown, onTearDownAfterTransaction, onTearDownInTransaction, preventTransaction, setDefaultRollback, setTransactionDefinition, setTransactionManager, startNewTransaction
 
Methods inherited from class org.springframework.test.AbstractDependencyInjectionSpringContextTests
getAutowireMode, injectDependencies, isDependencyCheck, isPopulateProtectedVariables, prepareTestInstance, setAutowireMode, setDependencyCheck, setPopulateProtectedVariables
 
Methods inherited from class org.springframework.test.AbstractSingleSpringContextTests
contextKey, createApplicationContext, createBeanDefinitionReader, customizeBeanFactory, getApplicationContext, getConfigLocations, getConfigPath, getConfigPaths, getLoadCount, loadContext, loadContextLocations, prepareApplicationContext, setDirty, setUp, tearDown
 
Methods inherited from class org.springframework.test.AbstractSpringContextTests
addContext, contextKeyString, getContext, hasCachedContext, isContextKeyEmpty, setDirty
 
Methods inherited from class org.springframework.test.ConditionalTestCase
getDisabledTestCount, isDisabledInThisEnvironment, recordDisabled
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runTest, setName, toString
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EnhancedTestCase

public EnhancedTestCase()
Method Detail

assertEquals

public static void assertEquals(byte[] expected,
                                byte[] actual)
Assert equality between two arrays of bytes.

Parameters:
expected - The expected array.
actual - The inspected array.

assertEquals

public static void assertEquals(java.lang.String description,
                                byte[] expected,
                                byte[] actual)
Assert equality between two arrays of bytes.

Parameters:
description - The message in case of inequality.
expected - The expected array.
actual - The inspected array.

assertEquals

public static void assertEquals(double[] expected,
                                double[] actual)
Assert equality between two arrays of doubles.

Parameters:
expected - The expected array.
actual - The inspected array.

assertEquals

public static void assertEquals(java.lang.String description,
                                double[] expected,
                                double[] actual)
Assert equality between two arrays of doubles.

Parameters:
description - The message in case of inequality.
expected - The expected array.
actual - The inspected array.

assertEqualsIgnoreCase

public static void assertEqualsIgnoreCase(java.lang.String expected,
                                          java.lang.String actual)
Assert equality of two strings, ignoring the case.

Parameters:
expected - The expected string.
actual - The inspected string.

assertEmpty

public static void assertEmpty(java.util.Collection c)
Assert the emptyness of a Collection.

Parameters:
c - The collection to inspect.

assertNotEmpty

public static void assertNotEmpty(java.lang.String message,
                                  java.util.Collection c)
Assert the not emptyness of a Collection.

Parameters:
message - The message in case the collection is empty.
c - The collection to inspect.

assertNotEmpty

public static void assertNotEmpty(java.util.Collection c)
Assert the not emptyness of a Collection.

Parameters:
c - The collection to inspect.

assertNotEmpty

public static void assertNotEmpty(java.lang.String message,
                                  java.lang.Object[] array)
Assert the not emptyness of an array of Objects.

Parameters:
message - The message in case the array is empty.
array - The collection to inspect.

assertNotEmpty

public static void assertNotEmpty(java.lang.Object[] array)
Assert the not emptyness of an array of Objects.

Parameters:
array - The collection to inspect.

assertSize

public static void assertSize(int size,
                              java.util.Collection c)
Assert the size of a Collection.

Parameters:
size - The expected size.
c - The Collection to inspect.


Copyright © 2009-2010 Lambico Team. All Rights Reserved.