org.objectweb.cjdbc.scenario.standalone.sql.request
Class InsertRequestTest

java.lang.Object
  extended byTestCase
      extended byorg.objectweb.cjdbc.scenario.templates.NoTemplate
          extended byorg.objectweb.cjdbc.scenario.standalone.sql.request.InsertRequestTest

public class InsertRequestTest
extends NoTemplate

Author:
Mathieu Peltier org.objectweb.cjdbc.common.sql..InsertRequest
See Also:
Serialized Form

Nested Class Summary
(package private)  class InsertRequestTest.MyComparator
           
protected  class InsertRequestTest.ParsingResult
          Stores the expected result of the call to InsertRequest.parse(DatabaseSchema, int, boolean) method.
 
Field Summary
private  AbstractDatabase database
          Database on which the requests are performed.
(package private) static boolean inited
           
private  java.util.ArrayList results
          List of ParsingResult objects.
private static java.lang.String RUBIS_INSERT_REQUESTS_FILE
          File name containing the requests to test.
 
Fields inherited from class org.objectweb.cjdbc.scenario.templates.NoTemplate
logger, TEXT_DIR
 
Constructor Summary
InsertRequestTest()
           
 
Method Summary
 void debugArrayList(java.lang.String header, java.util.ArrayList al)
          Print the given ArrayList prepended by a given header.
private  void parse(InsertRequestTest.ParsingResult result, boolean isCaseSensitive)
          Perfoms the parsing test.
protected  void setUp()
           
 java.util.ArrayList sortArrayList(java.util.ArrayList al)
          Sort the given ArrayList
 void testParse()
          org.objectweb.cjdbc.common.sql.InsertRequest#parse(DatabaseSchema, int, boolean)
 
Methods inherited from class org.objectweb.cjdbc.scenario.templates.NoTemplate
getTextPath, getUserDir
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RUBIS_INSERT_REQUESTS_FILE

private static final java.lang.String RUBIS_INSERT_REQUESTS_FILE
File name containing the requests to test.


database

private AbstractDatabase database
Database on which the requests are performed.


results

private java.util.ArrayList results
List of ParsingResult objects.


inited

static boolean inited
Constructor Detail

InsertRequestTest

public InsertRequestTest()
Method Detail

setUp

protected void setUp()
See Also:
junit.framework.TestCase#setUp()

testParse

public void testParse()
org.objectweb.cjdbc.common.sql.InsertRequest#parse(DatabaseSchema, int, boolean)


parse

private void parse(InsertRequestTest.ParsingResult result,
                   boolean isCaseSensitive)
Perfoms the parsing test.

Parameters:
result - expected result
isCaseSensitive - true if the parsing must be case sensitive.

sortArrayList

public java.util.ArrayList sortArrayList(java.util.ArrayList al)
Sort the given ArrayList

Parameters:
al - the ArrayList to sort
Returns:
the sorted ArrayList

debugArrayList

public void debugArrayList(java.lang.String header,
                           java.util.ArrayList al)
Print the given ArrayList prepended by a given header. Expects an ArrayList of TableColumn but will not fail if it is not.

Parameters:
header - header to display
al - ArrayList to display


Copyright © 2002, 2005 - ObjectWeb Consortium - All Rights Reserved.