|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object junit.framework.Assert junit.framework.TestCase org.xmlBlaster.test.client.TestPtPDispatch
public class TestPtPDispatch
Invoke examples:
java junit.textui.TestRunner -noloading org.xmlBlaster.test.client.TestPtPDispatch java junit.swingui.TestRunner -noloading org.xmlBlaster.test.client.TestPtPDispatch
I_XmlBlasterAccess
Field Summary | |
---|---|
private int |
counter
|
private PtPDestination[] |
destinations
|
private Global |
glob
|
private static java.util.logging.Logger |
log
|
private static java.lang.String |
ME
|
private int |
numDestinations
|
private java.lang.String |
subjectName
|
private static long |
TIMEOUT
|
Constructor Summary | |
---|---|
TestPtPDispatch(Global glob,
java.lang.String testName)
|
|
TestPtPDispatch(java.lang.String testName)
|
Method Summary | |
---|---|
private void |
checkWithoutPublish(PtPDestination dest,
boolean wantsPtP,
int expected,
long delay)
Does a connect, waits for updates, compares the number of updates with the expected and makes a disconnect. |
private void |
checkWithReconnect(int dest,
boolean wantsPtP,
int expected,
long delay)
|
private void |
cleanup()
|
private void |
doPublish(int destNum,
boolean forceQueuing,
boolean expectEx,
int[] counts,
long timeout,
boolean persistent,
java.lang.String contentPrefix)
|
static void |
main(java.lang.String[] args)
Deprecated. Use the TestRunner from the testsuite to run it: java -Djava.compiler= junit.textui.TestRunner org.xmlBlaster.test.client.TestPtPDispatch |
private void |
noQueuingNoOverflow(boolean isPersistent,
java.lang.String msgPrefix)
5 messages are sent |
private void |
noQueuingOverflow(boolean isPersistent,
java.lang.String msgPrefix)
12 messages are sent |
private void |
prepare(boolean shutdownCb)
|
private void |
queuingNoOverflow(boolean isPersistent,
java.lang.String msgPrefix)
5 messages are sent |
private void |
queuingOverflow(boolean isPersistent,
java.lang.String msgPrefix)
12 messages are sent |
protected void |
setUp()
Sets up the fixture. |
private void |
subjectQueueNoOverflow(boolean isPersistent,
java.lang.String msgPrefix)
|
protected void |
tearDown()
Tears down the fixture. |
void |
testNoQueuingNoOverflowPersistent()
TEST: |
void |
testNoQueuingNoOverflowTransient()
TEST: |
void |
testNoQueuingOverflowPersistent()
TEST: |
void |
testNoQueuingOverflowTransient()
TEST: |
void |
testQueuingNoOverflowPersistent()
TEST: |
void |
testQueuingNoOverflowTransient()
TEST: |
void |
testQueuingOverflowPersistent()
|
void |
testQueuingOverflowTransient()
|
void |
testSubjectQueueNoOverflowPersistent()
|
void |
testSubjectQueueNoOverflowTransient()
|
void |
testSubjectQueueOverflowPersistent()
|
void |
testSubjectQueueOverflowTransient()
|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static java.lang.String ME
private static final long TIMEOUT
private Global glob
private static java.util.logging.Logger log
private PtPDestination[] destinations
private int numDestinations
private int counter
private java.lang.String subjectName
Constructor Detail |
---|
public TestPtPDispatch(java.lang.String testName)
public TestPtPDispatch(Global glob, java.lang.String testName)
Method Detail |
---|
protected void setUp()
setUp
in class junit.framework.TestCase
private void prepare(boolean shutdownCb)
private void cleanup()
protected void tearDown()
tearDown
in class junit.framework.TestCase
private void doPublish(int destNum, boolean forceQueuing, boolean expectEx, int[] counts, long timeout, boolean persistent, java.lang.String contentPrefix)
destNum
- the number of the destination int the destinations array
for which the message is intended. If you want to send it to the
subject (i.e. no specific session) you pass a negative value.forceQueuing
- if true it will force queuing (refering to the destination).expectEx
- true if you expect an exception here, false otherwise.counts
- an int[] containing the expected amount of updates for each
destination. NOTE this has to be filled out even if you expect anprivate void checkWithReconnect(int dest, boolean wantsPtP, int expected, long delay)
private void checkWithoutPublish(PtPDestination dest, boolean wantsPtP, int expected, long delay)
dest
- the destination to use (to check)expected
- the number of updates expected after a connectdelay
- the time in ms to wait between connect and checkprivate void noQueuingNoOverflow(boolean isPersistent, java.lang.String msgPrefix)
public void testNoQueuingNoOverflowTransient()
public void testNoQueuingNoOverflowPersistent()
private void noQueuingOverflow(boolean isPersistent, java.lang.String msgPrefix)
public void testNoQueuingOverflowTransient()
public void testNoQueuingOverflowPersistent()
private void queuingNoOverflow(boolean isPersistent, java.lang.String msgPrefix)
public void testQueuingNoOverflowTransient()
public void testQueuingNoOverflowPersistent()
private void queuingOverflow(boolean isPersistent, java.lang.String msgPrefix)
public void testQueuingOverflowTransient()
public void testQueuingOverflowPersistent()
private void subjectQueueNoOverflow(boolean isPersistent, java.lang.String msgPrefix)
public void testSubjectQueueNoOverflowTransient()
public void testSubjectQueueNoOverflowPersistent()
public void testSubjectQueueOverflowTransient()
public void testSubjectQueueOverflowPersistent()
public static void main(java.lang.String[] args)
java -Djava.compiler= junit.textui.TestRunner org.xmlBlaster.test.client.TestPtPDispatch
|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |