xmlBlaster 1.5.1 API

org.xmlBlaster.test.qos
Class TestInvocationRecorder

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.xmlBlaster.test.qos.TestInvocationRecorder
All Implemented Interfaces:
I_XmlBlaster, junit.framework.Test

public class TestInvocationRecorder
extends junit.framework.TestCase
implements I_XmlBlaster

This client tests the RamRecorder.

This test invokes every method, and compares the values of the playback messages with their originals. This test needs no running xmlBlaster.
Invoke examples:

    java junit.textui.TestRunner org.xmlBlaster.test.qos.TestInvocationRecorder
    java junit.swingui.TestRunner org.xmlBlaster.test.qos.TestInvocationRecorder
 


Field Summary
private  MsgUnit[] dummyMArr
           
private  Global glob
           
private static java.util.logging.Logger log
           
private  int numErase
           
private  int numGet
           
private  int numPublish
           
private  int numPublishArr
           
private  int numSubscribe
           
private  int numUnSubscribe
           
private  int numUpdate
           
private  java.lang.String qos_get
           
private  java.lang.String qos_subscribe
           
private  RamRecorder recorder
           
private  java.lang.String xmlKey_get
           
private  java.lang.String xmlKey_subscribe
           
 
Fields inherited from class junit.framework.TestCase
 
Constructor Summary
TestInvocationRecorder(Global glob, java.lang.String testName)
          Constructs the TestInvocationRecorder object.
 
Method Summary
 EraseReturnQos[] erase(java.lang.String xmlKey_literal, java.lang.String qos_literal)
           
 MsgUnit[] get(java.lang.String xmlKey_literal, java.lang.String qos_literal)
           
static void main(java.lang.String[] args)
          Invoke: java org.xmlBlaster.test.qos.TestInvocationRecorder -logging FINEST
 PublishReturnQos publish(MsgUnit msgUnit)
           
 PublishReturnQos[] publishArr(MsgUnit[] msgUnitArr)
           
 void publishOneway(MsgUnit[] msgUnitArr)
           
protected  void setUp()
          Sets up the fixture.
 SubscribeReturnQos subscribe(java.lang.String xmlKey_literal, java.lang.String qos_literal)
           
static junit.framework.Test suite()
          Method is used by TestRunner to load these tests
protected  void tearDown()
          Tears down the fixture.
 void test()
          This test invokes every method, and compares the values of the playback messages with their originals
 UnSubscribeReturnQos[] unSubscribe(java.lang.String xmlKey_literal, java.lang.String qos_literal)
          For I_InvocationRecorder interface
 
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 final Global glob

log

private static java.util.logging.Logger log

recorder

private RamRecorder recorder

numSubscribe

private int numSubscribe

numUnSubscribe

private int numUnSubscribe

numPublish

private int numPublish

numPublishArr

private int numPublishArr

numErase

private int numErase

numGet

private int numGet

numUpdate

private int numUpdate

dummyMArr

private MsgUnit[] dummyMArr

xmlKey_get

private java.lang.String xmlKey_get

qos_get

private java.lang.String qos_get

xmlKey_subscribe

private java.lang.String xmlKey_subscribe

qos_subscribe

private java.lang.String qos_subscribe
Constructor Detail

TestInvocationRecorder

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

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

setUp

protected void setUp()
Sets up the fixture.

Connect to xmlBlaster and login


tearDown

protected void tearDown()
Tears down the fixture.

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


test

public void test()
This test invokes every method, and compares the values of the playback messages with their originals


subscribe

public SubscribeReturnQos subscribe(java.lang.String xmlKey_literal,
                                    java.lang.String qos_literal)
                             throws XmlBlasterException
Specified by:
subscribe in interface I_XmlBlaster
Returns:
dummy to match I_InvocationRecorder interface
Throws:
XmlBlasterException

unSubscribe

public UnSubscribeReturnQos[] unSubscribe(java.lang.String xmlKey_literal,
                                          java.lang.String qos_literal)
                                   throws XmlBlasterException
For I_InvocationRecorder interface

Specified by:
unSubscribe in interface I_XmlBlaster
Throws:
XmlBlasterException
See Also:
CORBA xmlBlaster.idl

publish

public PublishReturnQos publish(MsgUnit msgUnit)
                         throws XmlBlasterException
Specified by:
publish in interface I_XmlBlaster
Returns:
dummy to match I_InvocationRecorder interface
Throws:
XmlBlasterException
See Also:
CORBA xmlBlaster.idl

publishOneway

public void publishOneway(MsgUnit[] msgUnitArr)
Specified by:
publishOneway in interface I_XmlBlaster
Returns:
dummy to match I_InvocationRecorder interface
See Also:
CORBA xmlBlaster.idl

publishArr

public PublishReturnQos[] publishArr(MsgUnit[] msgUnitArr)
                              throws XmlBlasterException
Specified by:
publishArr in interface I_XmlBlaster
Returns:
dummy to match I_InvocationRecorder interface
Throws:
XmlBlasterException
See Also:
CORBA xmlBlaster.idl

erase

public EraseReturnQos[] erase(java.lang.String xmlKey_literal,
                              java.lang.String qos_literal)
                       throws XmlBlasterException
Specified by:
erase in interface I_XmlBlaster
Returns:
dummy to match I_InvocationRecorder interface
Throws:
XmlBlasterException
See Also:
CORBA xmlBlaster.idl

get

public MsgUnit[] get(java.lang.String xmlKey_literal,
                     java.lang.String qos_literal)
              throws XmlBlasterException
Specified by:
get in interface I_XmlBlaster
Returns:
dummy to match I_InvocationRecorder interface
Throws:
XmlBlasterException
See Also:
CORBA xmlBlaster.idl

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.TestInvocationRecorder -logging FINEST


xmlBlaster 1.5.1 API

Copyright © 1999-2007 The xmlBlaster.org contributers.