Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.miamm.soapmmil
Class SoapmmilTestCase  view SoapmmilTestCase download SoapmmilTestCase.java

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.miamm.soapmmil.SoapmmilTestCase
All Implemented Interfaces:
SoapMMILConstants, junit.framework.Test
Direct Known Subclasses:
MIAMMServiceEngineTest, ResponsesTableTest, SoapmmilMessageTest

public class SoapmmilTestCase
extends junit.framework.TestCase
implements SoapMMILConstants

Version:
$Revision: 1.4 $
$Date: 2003/05/04 20:45:46 $

Field Summary
(package private) static org.apache.log4j.Logger _logger
           
(package private)  org.apache.axis.transport.http.SimpleAxisServer _server
           
(package private) static boolean _serverStarted
           
(package private) static boolean _wakeUp
           
(package private) static int DELAY
           
(package private) static int MINI_DELAY
           
(package private) static int TEST_PORT
           
(package private) static java.lang.String TEST_ROOT
           
 
Fields inherited from class junit.framework.TestCase
 
Fields inherited from interface org.miamm.soapmmil.SoapMMILConstants
ELEMENT_MISOH_BLOCK, LOG4J_PROPERTY, misohDescriptor, NAMESPACE_PREFIX_MIAMM, NAMESPACE_URI_MIAMM, PROPERTY_MIAMM_SMART_RECEIVER, PROPERTY_MIAMM_URLFILE
 
Constructor Summary
SoapmmilTestCase(java.lang.String name)
           
 
Method Summary
 void doTestDeploy()
           
static java.io.Reader getBigMessage()
           
static java.io.Reader getEmptyMessage()
           
static void snooze(int milliseconds, java.lang.String message)
          Sleeps for a period of time, waking up a couple of times per second to check if we should stop sleeping.
static void snoozeReset()
          Reset the alarm clock in case it was triggered before we started snoozing
 void startServer()
          Starts the AXIS server in a seperate thread.
 void stopServer()
          Stops the AXIS server.
static void wakeUp(java.lang.String message)
          Wake this Thread up if we were sleeping
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_logger

static org.apache.log4j.Logger _logger

TEST_ROOT

static final java.lang.String TEST_ROOT
See Also:
Constant Field Values

_server

org.apache.axis.transport.http.SimpleAxisServer _server

_wakeUp

static boolean _wakeUp

_serverStarted

static boolean _serverStarted

TEST_PORT

static final int TEST_PORT
See Also:
Constant Field Values

DELAY

static final int DELAY
See Also:
Constant Field Values

MINI_DELAY

static final int MINI_DELAY
See Also:
Constant Field Values
Constructor Detail

SoapmmilTestCase

public SoapmmilTestCase(java.lang.String name)
Method Detail

getEmptyMessage

public static java.io.Reader getEmptyMessage()
                                      throws java.lang.Exception

getBigMessage

public static java.io.Reader getBigMessage()
                                    throws java.lang.Exception

startServer

public void startServer()
                 throws java.lang.Exception
Starts the AXIS server in a seperate thread. We need to do this within the same process so that we can still communicate statically with the NullMIAMMService object.


stopServer

public void stopServer()
                throws java.lang.Exception
Stops the AXIS server.


doTestDeploy

public void doTestDeploy()
                  throws java.lang.Exception

snooze

public static void snooze(int milliseconds,
                          java.lang.String message)
                   throws java.lang.InterruptedException
Sleeps for a period of time, waking up a couple of times per second to check if we should stop sleeping. One advantage of snoozing over sleeping is that we can snooze for longer periods of time (say to account for slower computers or whatever), knowing that we'll get woken up anyway. Otherwise, we'd be impatient and sleep for less than we really should. FIXME: i didn't know about wait and notifyAll when i wrote this... maybe we can get rid of this nonsense then!


wakeUp

public static void wakeUp(java.lang.String message)
Wake this Thread up if we were sleeping


snoozeReset

public static void snoozeReset()
Reset the alarm clock in case it was triggered before we started snoozing