cactus
Class SyncBeanTest

java.lang.Object
junit.framework.Assert
junit.framework.TestCase
org.apache.cactus.internal.AbstractCactusTestCase
org.apache.cactus.ServletTestCase
cactus.SyncBeanTest
- All Implemented Interfaces:
- org.apache.cactus.internal.CactusTestCase, junit.framework.Test
- public class SyncBeanTest
- extends org.apache.cactus.ServletTestCase
Tests of the SyncBean, the Sync4j EJB. This is to show
how the client can obtain SyncBean's remote interface and invoke its
business methods, processMessage(), with different
message types.
| Fields inherited from class junit.framework.TestCase |
|
|
Method Summary |
protected void |
setUp()
Sets up every test by obtaining the SyncEJB by its remote interface,
SyncHomeRemote and SyncRemote, and
initializes different types of message for testing. |
static junit.framework.Test |
suite()
An aggregrate of all the tests. |
void |
testProcessUnknownMessage()
Verifies that we can handle Unknown (neither XML nor WBXML) message
without any problems. |
void |
testProcessWBXMLMessage()
Verifies that we can process WBXML message. |
void |
testProcessXMLMessage()
Verifies that we can process XML message. |
| 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 |
sync
private sync4j.server.syncbean.SyncRemote sync
- A reference to the SyncEJB remote interface. It is an entry point
of all the business logic.
requestXmlMsg
private byte[] requestXmlMsg
- A request message, in XML format.
requestWbXmlMsg
private byte[] requestWbXmlMsg
- A request message, in WB XML format.
requestUnknownMsg
private byte[] requestUnknownMsg
- A message of unknown type to test the error handling.
response
private sync4j.framework.server.SyncResponse response
- A reference to the response received from the SyncEJB business
method.
SyncBeanTest
public SyncBeanTest(java.lang.String theName)
- Defines the testcase name for JUnit.
suite
public static junit.framework.Test suite()
- An aggregrate of all the tests.
setUp
protected void setUp()
- Sets up every test by obtaining the SyncEJB by its remote interface,
SyncHomeRemote and SyncRemote, and
initializes different types of message for testing.
testProcessXMLMessage
public void testProcessXMLMessage()
throws java.lang.Exception
- Verifies that we can process XML message.
testProcessWBXMLMessage
public void testProcessWBXMLMessage()
throws java.lang.Exception
- Verifies that we can process WBXML message.
testProcessUnknownMessage
public void testProcessUnknownMessage()
throws java.lang.Exception
- Verifies that we can handle Unknown (neither XML nor WBXML) message
without any problems.