xmlBlaster 2.2.0 API

org.xmlBlaster.test.qos
Class TestSubXPath

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

public class TestSubXPath
extends junit.framework.TestCase

This client tests the method subscribe() with a later publish() with XPath query.
The subscribe() on message 3 should be recognized for this later arriving publish()

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.TestSubXPath
    java junit.swingui.TestRunner -noloading org.xmlBlaster.test.qos.TestSubXPath
 


Field Summary
private  java.lang.String contentMime
           
private  Global glob
           
private static java.util.logging.Logger log
           
private  java.lang.String ME
           
private  int numPublish
           
private  java.lang.String publishOid
           
private  java.lang.String receiverName
           
private  I_XmlBlasterAccess senderConnection
           
private  java.lang.String senderName
           
private  java.lang.String subscribeOid
           
private  MsgInterceptor updateInterceptor
           
 
Constructor Summary
TestSubXPath(Global glob, java.lang.String testName, java.lang.String loginName)
          Constructs the TestSubXPath object.
 
Method Summary
private  void doPublish()
          TEST: Construct 5 messages and publish them.
static void main(java.lang.String[] args)
          Invoke: java org.xmlBlaster.test.qos.TestSubXPath
protected  void setUp()
          Sets up the fixture.
private  void subscribeXPath(java.lang.String query)
          TEST: Subscribe to message number 3 with XPATH.
static junit.framework.Test suite()
          Method is used by TestRunner to load these tests
protected  void tearDown()
          Tears down the fixture.
 void testAttribute()
          TEST: Check if XPath finds XML-attributes
 void testInitial()
          TEST: Construct 5 messages and publish them,
the previous XPath subscription should match message #3 and send an update.
 void testPublishAfterSubscribeXPath()
          TEST: Construct 5 messages and publish them,
the previous XPath subscription should match message #3 and send an update.
 
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 java.lang.String ME

glob

private final Global glob

log

private static java.util.logging.Logger log

publishOid

private java.lang.String publishOid

senderConnection

private I_XmlBlasterAccess senderConnection

senderName

private java.lang.String senderName

receiverName

private java.lang.String receiverName

numPublish

private int numPublish

contentMime

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

subscribeOid

private java.lang.String subscribeOid

updateInterceptor

private MsgInterceptor updateInterceptor
Constructor Detail

TestSubXPath

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

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

setUp

protected void setUp()
Sets up the fixture.

Connect to xmlBlaster and login

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

subscribeXPath

private void subscribeXPath(java.lang.String query)
TEST: Subscribe to message number 3 with XPATH.


doPublish

private void doPublish()
TEST: Construct 5 messages and publish them.

The returned publishOid is checked


testInitial

public void testInitial()
TEST: Construct 5 messages and publish them,
the previous XPath subscription should match message #3 and send an update.


testAttribute

public void testAttribute()
TEST: Check if XPath finds XML-attributes


testPublishAfterSubscribeXPath

public void testPublishAfterSubscribeXPath()
TEST: Construct 5 messages and publish them,
the previous XPath subscription should match message #3 and send an update.


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.TestSubXPath


xmlBlaster 2.2.0 API

Copyright © 1999-2014 The xmlBlaster.org contributers.