xmlBlaster 2.2.0 API

org.xmlBlaster.test.qos
Class TestPtSession

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.xmlBlaster.test.qos.TestPtSession
All Implemented Interfaces:
junit.framework.Test

public class TestPtSession
extends junit.framework.TestCase

This client tests the engine.qos.publish.destination.PtPa href="http://www.xmlblaster.org/xmlBlaster/doc/requirements/engine.qos.publish.destination.PtP.html">engine.qos.publish.destination.PtP requirement

We login as a publisher for PtP messages and many receivers. Depending on the destination name a message is sent to all sessions or only to specified sessions of the same user.

We start our own xmlBlaster server in a thread. This client may be invoked multiple time on the same xmlBlaster server, as it cleans up everything after his tests are done.

Invoke examples:

    java junit.textui.TestRunner -noloading org.xmlBlaster.test.qos.TestPtSession
    java junit.swingui.TestRunner -noloading org.xmlBlaster.test.qos.TestPtSession
 


Nested Class Summary
(package private)  class TestPtSession.ConHolder
           
 
Field Summary
private  TestPtSession.ConHolder[] conHolderArr
           
private  Global glob
           
private static java.util.logging.Logger log
           
private  java.lang.String msgOid
           
private  int msgSequenceNumber
           
private  java.lang.String name
           
private  int numCons
           
private  java.lang.String passwd
           
private  int serverPort
           
private  EmbeddedXmlBlaster serverThread
           
private  boolean startEmbedded
           
 
Constructor Summary
TestPtSession(Global glob, java.lang.String testName, java.lang.String name)
          Constructs the TestPtSession object.
 
Method Summary
static void main(java.lang.String[] args)
          Invoke:
private  void publish(TestPtSession.ConHolder conHolder, java.lang.String oid, SessionName[] sessionNameArr)
           
protected  void setUp()
          Sets up the fixture.
static junit.framework.Test suite()
          Method is used by TestRunner to load these tests
protected  void tearDown()
          Tears down the fixture.
 void testPtSession()
          Test all tuples of possibilities
 
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

glob

private Global glob

log

private static java.util.logging.Logger log

numCons

private int numCons

conHolderArr

private TestPtSession.ConHolder[] conHolderArr

name

private java.lang.String name

passwd

private java.lang.String passwd

serverThread

private EmbeddedXmlBlaster serverThread

serverPort

private int serverPort

startEmbedded

private boolean startEmbedded

msgOid

private final java.lang.String msgOid
See Also:
Constant Field Values

msgSequenceNumber

private int msgSequenceNumber
Constructor Detail

TestPtSession

public TestPtSession(Global glob,
                     java.lang.String testName,
                     java.lang.String name)
Constructs the TestPtSession object.

Parameters:
testName - The name used in the test suite
name - The name to login to the xmlBlaster
Method Detail

setUp

protected void setUp()
Sets up the fixture.

We start an own xmlBlaster server in a separate thread.

Then we connect our 5 clients

Overrides:
setUp in class junit.framework.TestCase

publish

private void publish(TestPtSession.ConHolder conHolder,
                     java.lang.String oid,
                     SessionName[] sessionNameArr)

testPtSession

public void testPtSession()
Test all tuples of possibilities


tearDown

protected void tearDown()
Tears down the fixture.

cleaning up .... erase() the previous message OID and logout

Overrides:
tearDown in class junit.framework.TestCase

suite

public static junit.framework.Test suite()
Method is used by TestRunner to load these tests


main

public static void main(java.lang.String[] args)
Invoke:
  java org.xmlBlaster.test.qos.TestPtSession  -logging/org.xmlBlaster.client.qos FINE -logging/org.xmlBlaster.util.qos FINE -logging/org.xmlBlaster.engine FINEST -startEmbedded false
  java -Djava.compiler= junit.textui.TestRunner -noloading org.xmlBlaster.test.qos.TestPtSession
 


xmlBlaster 2.2.0 API

Copyright © 1999-2014 The xmlBlaster.org contributers.