net.sf.farrago.test
Class FarragoServerTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by net.sf.farrago.test.FarragoServerTest
All Implemented Interfaces:
Test
Direct Known Subclasses:
FarragoVjdbcServerTest

public class FarragoServerTest
extends TestCase

FarragoServerTest tests Farrago client/server connections via RmiJdbc. It does not inherit from FarragoTestCase since that pulls in an embedded engine.

Version:
$Id: //open/dev/farrago/src/net/sf/farrago/test/FarragoServerTest.java#25 $
Author:
John V. Sichi

Field Summary
private  FarragoAbstractServer server
           
private static String stmtMismatch
           
 
Constructor Summary
FarragoServerTest(String testCaseName)
          Initializes a new FarragoServerTest.
 
Method Summary
protected  boolean isJRockit()
           
private  void killServer()
           
protected  FarragoAbstractJdbcDriver newClientDriver()
           
protected  FarragoAbstractServer newServer()
           
protected  void setUp()
           
protected  void tearDown()
           
 void testConnectionParams()
          Tests client driver connection URI parameters.
 void testExceptionContents()
          Tests that Paser/Validator exceptions contain original statement.
 void testKillServer()
           
 void testServer()
           
 void testTwoServers()
          Tests error message when a 2nd server is started.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, 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, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

stmtMismatch

private static final String stmtMismatch
See Also:
Constant Field Values

server

private FarragoAbstractServer server
Constructor Detail

FarragoServerTest

public FarragoServerTest(String testCaseName)
                  throws Exception
Initializes a new FarragoServerTest.

Parameters:
testCaseName - JUnit test case name
Throws:
Exception
Method Detail

setUp

protected void setUp()
              throws Exception
Overrides:
setUp in class TestCase
Throws:
Exception

newServer

protected FarragoAbstractServer newServer()

newClientDriver

protected FarragoAbstractJdbcDriver newClientDriver()

isJRockit

protected boolean isJRockit()

testServer

public void testServer()
                throws Exception
Throws:
Exception

testKillServer

public void testKillServer()
                    throws Exception
Throws:
Exception

testConnectionParams

public void testConnectionParams()
                          throws Throwable
Tests client driver connection URI parameters. The underlying connect-string processing is tested by FarragoEngineDriverTest.testConnectStrings() using the engine driver. This method adds tests of client connections and parameter precedence with the client driver.

Throws:
Throwable

testExceptionContents

public void testExceptionContents()
                           throws Throwable
Tests that Paser/Validator exceptions contain original statement.

Throws:
Throwable

testTwoServers

public void testTwoServers()
                    throws Exception
Tests error message when a 2nd server is started.

Throws:
Exception

tearDown

protected void tearDown()
                 throws Exception
Overrides:
tearDown in class TestCase
Throws:
Exception

killServer

private void killServer()