org.jcoderz.commons.util
Class DbUtilServerTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.jcoderz.commons.TestCase
              extended by org.jcoderz.commons.ServerTestCase
                  extended by org.jcoderz.commons.util.DbUtilServerTest
All Implemented Interfaces:
Test

public class DbUtilServerTest
extends ServerTestCase

Tests the LimitedBatchSizePreparedStatement in the DbUtil class.

Author:
Albrecht Messner

Constructor Summary
DbUtilServerTest()
           
 
Method Summary
protected  void setUp()
          
 void testBatchWithExecute()
          Add a batch to a prepared statement and then call execute instead of executeBatch.
 void testBatchWithExecuteLbsStatement()
          Add a batch to a prepared statement and then call execute instead of executeBatch.
 void testClearBatch()
          Run addBatch, clearBatch and then executeBatch, check that no rows are created.
 void testClearBatchLbsStatement()
          Run addBatch, clearBatch and then executeBatch, check that no rows are created.
 void testDuplicateBatchUpdate()
          Test what happens when we call executeBatch without having a SQL statement in the prepared statement.
 void testDuplicateBatchUpdateLbsStatement()
           
 
Methods inherited from class org.jcoderz.commons.ServerTestCase
createTestSession, getTestServletUrl, getWeblogicDomainDir, runBare, runBareAtServer
 
Methods inherited from class org.jcoderz.commons.TestCase
getBaseDir, getHostName, getSuite, hasTestCases
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runTest, setName, tearDown, 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

DbUtilServerTest

public DbUtilServerTest()
Method Detail

setUp

protected void setUp()
              throws Exception

Overrides:
setUp in class TestCase
Throws:
Exception

testDuplicateBatchUpdate

public void testDuplicateBatchUpdate()
                              throws Exception
Test what happens when we call executeBatch without having a SQL statement in the prepared statement.

Throws:
Exception - if the testcase fails

testDuplicateBatchUpdateLbsStatement

public void testDuplicateBatchUpdateLbsStatement()
                                          throws Exception
Throws:
Exception

testBatchWithExecute

public void testBatchWithExecute()
                          throws Exception
Add a batch to a prepared statement and then call execute instead of executeBatch.

Throws:
Exception - if the testcase fails

testBatchWithExecuteLbsStatement

public void testBatchWithExecuteLbsStatement()
                                      throws Exception
Add a batch to a prepared statement and then call execute instead of executeBatch.

Throws:
Exception - if the testcase fails

testClearBatch

public void testClearBatch()
                    throws Exception
Run addBatch, clearBatch and then executeBatch, check that no rows are created.

Throws:
Exception - if the testcase fails

testClearBatchLbsStatement

public void testClearBatchLbsStatement()
                                throws Exception
Run addBatch, clearBatch and then executeBatch, check that no rows are created.

Throws:
Exception - if the testcase fails


Copyright 2007 The jCoderZ Project.