net.sourceforge.sqlunit.test
Class SortingTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by net.sourceforge.sqlunit.test.SortingTest
All Implemented Interfaces:
junit.framework.Test

public class SortingTest
extends junit.framework.TestCase

Some basic sorting tests to verify that the code works before I start on mock database based unit testing.

Version:
$Revision: 1.4 $
Author:
Sujit Pal (spal@users.sourceforge.net)

Constructor Summary
SortingTest(java.lang.String name)
          Boilerplate constructor.
 
Method Summary
static void main(java.lang.String[] argv)
          Boilerplate main method.
 void setUp()
          Setting up the mapper to contain type info before each test.
static junit.framework.Test suite()
          Boilerplate suite() method.
 void testSortByAuthorCharacterDesc()
          Testing the descending sort.
 void testSortByIdAndAuthorName()
          Sorting with two columns.
 void testSortByVice()
          Sorting with single column.
 void testSortByViceAuthorCharacter()
          Sorting with three columns.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, name, run, run, runBare, runTest, setName, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SortingTest

public SortingTest(java.lang.String name)
Boilerplate constructor.

Parameters:
name - the name of this test class.
Method Detail

main

public static void main(java.lang.String[] argv)
Boilerplate main method.

Parameters:
argv - the arguments (none).

suite

public static junit.framework.Test suite()
Boilerplate suite() method.

Returns:
a Test object.

setUp

public final void setUp()
                 throws java.lang.Exception
Setting up the mapper to contain type info before each test.

Overrides:
setUp in class junit.framework.TestCase
Throws:
java.lang.Exception - if there was a problem.

testSortByVice

public final void testSortByVice()
                          throws java.lang.Exception
Sorting with single column.

Throws:
java.lang.Exception - if there was a problem.

testSortByIdAndAuthorName

public final void testSortByIdAndAuthorName()
                                     throws java.lang.Exception
Sorting with two columns.

Throws:
java.lang.Exception - if there was a problem.

testSortByViceAuthorCharacter

public final void testSortByViceAuthorCharacter()
                                         throws java.lang.Exception
Sorting with three columns.

Throws:
java.lang.Exception - if there was a problem.

testSortByAuthorCharacterDesc

public final void testSortByAuthorCharacterDesc()
                                         throws java.lang.Exception
Testing the descending sort.

Throws:
java.lang.Exception - if there was a problem.