xmlBlaster 2.2.0 API

org.xmlBlaster.test.qos
Class TestSubMultiSubscribe

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

public class TestSubMultiSubscribe
extends junit.framework.TestCase

This client tests a subscribe() with multiSubscribe=false to avoid receiving duplicate updates from the same topic on multiple subscribes.
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 org.xmlBlaster.test.qos.TestSubMultiSubscribe
    java junit.swingui.TestRunner -noloading org.xmlBlaster.test.qos.TestSubMultiSubscribe
 

See Also:
interface subscribe requirement

Field Summary
private  I_XmlBlasterAccess connection
           
private  Global glob
           
private static java.util.logging.Logger log
           
private static java.lang.String ME
           
private  java.lang.String myDomain
           
private  java.lang.String publishOid
           
private  java.lang.String subscribeId
           
private  MsgInterceptor updateInterceptor
           
 
Constructor Summary
TestSubMultiSubscribe(Global glob, java.lang.String testName)
          Constructs the TestSubMultiSubscribe object.
 
Method Summary
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.qos.TestSubMultiSubscribe
 void publish()
          Construct a message and publish it.
protected  void setUp()
          Sets up the fixture.
 void subscribe(java.lang.String queryString, java.lang.String queryType, AccessFilterQos aq, int numSub)
          Subscribe multiple times to the same message with <multiSubscribe>false</multiSubscribe>
static junit.framework.Test suite()
          Method is used by TestRunner to load these tests
protected  void tearDown()
          Tears down the fixture.
 void testMultiSubscribeDomain()
          TEST: Construct a message and publish it, the first subscription shouldn't receive the message as local==false
 void testMultiSubscribeOid()
          TEST: Construct a message and publish it, the first subscription shouldn't receive the message as local==false
 void testMultiSubscribeXPath()
          TEST: Construct a message and publish it, the first subscription shouldn't receive the message as local==false
 void testSubscribeReconfigure()
          TEST: Change AccessFilter of SubscribeQos and test if reconfiguration works.
 void unSubscribe()
          unSubscribe twice to same message.
 
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

ME

private static java.lang.String ME

glob

private final Global glob

log

private static java.util.logging.Logger log

subscribeId

private java.lang.String subscribeId

myDomain

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

updateInterceptor

private MsgInterceptor updateInterceptor

publishOid

private java.lang.String publishOid

connection

private I_XmlBlasterAccess connection
Constructor Detail

TestSubMultiSubscribe

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

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

setUp

protected void setUp()
Sets up the fixture.

Overrides:
setUp in class junit.framework.TestCase

tearDown

protected void tearDown()
Tears down the fixture.

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

Overrides:
tearDown in class junit.framework.TestCase

subscribe

public void subscribe(java.lang.String queryString,
                      java.lang.String queryType,
                      AccessFilterQos aq,
                      int numSub)
Subscribe multiple times to the same message with <multiSubscribe>false</multiSubscribe>


publish

public void publish()
Construct a message and publish it.


unSubscribe

public void unSubscribe()
unSubscribe twice to same message.


testMultiSubscribeOid

public void testMultiSubscribeOid()
TEST: Construct a message and publish it, the first subscription shouldn't receive the message as local==false


testMultiSubscribeXPath

public void testMultiSubscribeXPath()
TEST: Construct a message and publish it, the first subscription shouldn't receive the message as local==false


testSubscribeReconfigure

public void testSubscribeReconfigure()
TEST: Change AccessFilter of SubscribeQos and test if reconfiguration works.


testMultiSubscribeDomain

public void testMultiSubscribeDomain()
TEST: Construct a message and publish it, the first subscription shouldn't receive the message as local==false


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)
Deprecated. Use the TestRunner from the testsuite to run it:

   java -Djava.compiler= junit.textui.TestRunner org.xmlBlaster.test.qos.TestSubMultiSubscribe

Invoke: java org.xmlBlaster.test.qos.TestSubMultiSubscribe


xmlBlaster 2.2.0 API

Copyright © 1999-2014 The xmlBlaster.org contributers.