jade.jademx.mbean
Class JadeRuntimeTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by jade.jademx.mbean.JadeRuntimeTest
All Implemented Interfaces:
junit.framework.Test

public class JadeRuntimeTest
extends junit.framework.TestCase

JadeRuntime MBean test

Author:
David Bernstein, Caboodle Networks, Inc.

Field Summary
private static java.lang.String BAD_CONFIG_RESOURCE
          resource name for configuration with bad XML
private static java.lang.String BAD_CONFIG_RESOURCE_MULTICFG
          resource name for configuration with bad XML: multiple jademx-config elements
private static java.lang.String BAD_CONFIG_RESOURCE_MULTIRUNTIME
          resource name for configuration with bad XML: multiple runtime elements
private static java.lang.String BAD_CONFIG_RESOURCE_NOCFG
          resource name for configuration with bad XML: zero jademx-config elements
private static java.lang.String EMPTY_CONFIG_RESOURCE
          resource name for configuration of one empty configuration
private static java.lang.String EMPTY_PLATFORM_CONFIG_RESOURCE
          resource name for configuration of one empty platform
private static java.lang.String EMPTY_PLATFORM_NOMTP_CONFIG_RESOURCE
          resource name for configuration of one empty platform
private static java.lang.String JADEMX_BUNDLE_NAME
          jademx resource bundle name
private static java.lang.String JADEMX_CVS_DATE_PROP
          name of jademx cvs date property
private static java.lang.String JADEMX_MAJOR_VERSION_PROP
          name of jademx major version property
private static java.lang.String JADEMX_MINOR_VERSION_PROP
          name of jademx minor version property
private static java.lang.String JADEMX_PATCH_VERSION_PROP
          name of jademx patch version property
private  jade.jademx.server.JadeMXServer jadeMXServer
          jadeMXServer we're using
private  jade.jademx.mbean.JadeRuntimeMBean jadeRuntime
          JadeRuntime created by setUp()
private static java.lang.String name
          test(suite) name
private static java.lang.String NONEXISTENT_CONFIG_RESOURCE
          resource name for configuration that doesn't exist
private static java.lang.String TWO_PING_CONFIG_RESOURCE
          resource name for configuration of two ping agents
 
Constructor Summary
JadeRuntimeTest()
          make TestCase for JadeRuntime
 
Method Summary
private  java.lang.String cvsDateToTimestamp(java.lang.String cvsDate)
          convert cvs-style date/time string to iso 8601 timestamp
private  void runTestOneEmptyPlatform(boolean isUrl, boolean returnMBean)
          run test of instantiating one empty platform
protected  void setUp()
           
static junit.framework.Test suite()
          return the implicit suite of tests
protected  void tearDown()
           
 void testBadConfig()
          test trying to use a configuration with bad XML
 void testBadConfigMultiCfg()
          test trying to use a configuration with bad XML: multiple configurations
 void testBadConfigMultiRuntime()
          test trying to use a configuration with bad XML: multiple runtimes
 void testBadConfigNoCfg()
          test trying to use a configuration with bad XML: zero configurations
 void testBadConfigURL()
          test trying to use a badly formatted url for configuration
 void testEmptyConfig()
          try testing empty configuration
 void testEmptyPlatformNoMTP()
          try testing empty platform with NOMTP specified
 void testGetCopyrightNotice()
          test runtime copyright notice
 void testGetJademxTimestamp()
          test jademx timestamp
 void testGetJademxVersion()
          test jademx version
 void testGetVersion()
          test runtime version
 void testGetVersionInfo()
          test runtime version information
 void testGetVersionTimestamp()
          test runtime version timestamp
 void testNonExistentConfig()
          test trying to use a configuration that doesn't exist
 void testOneEmptyPlatformResource()
          test creating a single empty platform from config spec'd by resource.
 void testOneEmptyPlatformResourceName()
          test getting platform name from config specified by java resource
 void testOneEmptyPlatformURL()
          test creating a single empty platform from config spec'd by URL
 void testOneEmptyPlatformURLName()
          test getting platform name from config specified by java URL
 void testTwoAgentPlatformXML()
          test intantiating a platform with two agents via XML
private  void verifyTwoAgentPlatform(jade.jademx.mbean.JadePlatform[] platformMBeans)
          verify the platform with two agents
 
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

name

private static java.lang.String name
test(suite) name


jadeRuntime

private jade.jademx.mbean.JadeRuntimeMBean jadeRuntime
JadeRuntime created by setUp()


jadeMXServer

private jade.jademx.server.JadeMXServer jadeMXServer
jadeMXServer we're using


JADEMX_BUNDLE_NAME

private static final java.lang.String JADEMX_BUNDLE_NAME
jademx resource bundle name

See Also:
Constant Field Values

JADEMX_MAJOR_VERSION_PROP

private static final java.lang.String JADEMX_MAJOR_VERSION_PROP
name of jademx major version property

See Also:
Constant Field Values

JADEMX_MINOR_VERSION_PROP

private static final java.lang.String JADEMX_MINOR_VERSION_PROP
name of jademx minor version property

See Also:
Constant Field Values

JADEMX_PATCH_VERSION_PROP

private static final java.lang.String JADEMX_PATCH_VERSION_PROP
name of jademx patch version property

See Also:
Constant Field Values

JADEMX_CVS_DATE_PROP

private static final java.lang.String JADEMX_CVS_DATE_PROP
name of jademx cvs date property

See Also:
Constant Field Values

EMPTY_CONFIG_RESOURCE

private static final java.lang.String EMPTY_CONFIG_RESOURCE
resource name for configuration of one empty configuration

See Also:
Constant Field Values

EMPTY_PLATFORM_CONFIG_RESOURCE

private static final java.lang.String EMPTY_PLATFORM_CONFIG_RESOURCE
resource name for configuration of one empty platform

See Also:
Constant Field Values

EMPTY_PLATFORM_NOMTP_CONFIG_RESOURCE

private static final java.lang.String EMPTY_PLATFORM_NOMTP_CONFIG_RESOURCE
resource name for configuration of one empty platform

See Also:
Constant Field Values

TWO_PING_CONFIG_RESOURCE

private static final java.lang.String TWO_PING_CONFIG_RESOURCE
resource name for configuration of two ping agents

See Also:
Constant Field Values

NONEXISTENT_CONFIG_RESOURCE

private static final java.lang.String NONEXISTENT_CONFIG_RESOURCE
resource name for configuration that doesn't exist

See Also:
Constant Field Values

BAD_CONFIG_RESOURCE

private static final java.lang.String BAD_CONFIG_RESOURCE
resource name for configuration with bad XML

See Also:
Constant Field Values

BAD_CONFIG_RESOURCE_MULTICFG

private static final java.lang.String BAD_CONFIG_RESOURCE_MULTICFG
resource name for configuration with bad XML: multiple jademx-config elements

See Also:
Constant Field Values

BAD_CONFIG_RESOURCE_NOCFG

private static final java.lang.String BAD_CONFIG_RESOURCE_NOCFG
resource name for configuration with bad XML: zero jademx-config elements

See Also:
Constant Field Values

BAD_CONFIG_RESOURCE_MULTIRUNTIME

private static final java.lang.String BAD_CONFIG_RESOURCE_MULTIRUNTIME
resource name for configuration with bad XML: multiple runtime elements

See Also:
Constant Field Values
Constructor Detail

JadeRuntimeTest

public JadeRuntimeTest()
make TestCase for JadeRuntime

Method Detail

setUp

protected void setUp()
              throws java.lang.Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
java.lang.Exception

tearDown

protected void tearDown()
                 throws java.lang.Exception
Overrides:
tearDown in class junit.framework.TestCase
Throws:
java.lang.Exception

testGetCopyrightNotice

public void testGetCopyrightNotice()
test runtime copyright notice


testGetVersionInfo

public void testGetVersionInfo()
test runtime version information


testGetVersion

public void testGetVersion()
test runtime version


testGetVersionTimestamp

public void testGetVersionTimestamp()
test runtime version timestamp


testGetJademxVersion

public void testGetJademxVersion()
test jademx version


testGetJademxTimestamp

public void testGetJademxTimestamp()
test jademx timestamp


cvsDateToTimestamp

private java.lang.String cvsDateToTimestamp(java.lang.String cvsDate)
convert cvs-style date/time string to iso 8601 timestamp

Parameters:
cvsDate - date to convert
Returns:
equivalent iso8601 timestamp

runTestOneEmptyPlatform

private void runTestOneEmptyPlatform(boolean isUrl,
                                     boolean returnMBean)
run test of instantiating one empty platform

Parameters:
isUrl - true iff configuration specified by URL, else resource
returnMBean - true iff want MBean back, else MBean's name

testOneEmptyPlatformResource

public void testOneEmptyPlatformResource()
test creating a single empty platform from config spec'd by resource.


testOneEmptyPlatformResourceName

public void testOneEmptyPlatformResourceName()
test getting platform name from config specified by java resource


testOneEmptyPlatformURL

public void testOneEmptyPlatformURL()
test creating a single empty platform from config spec'd by URL


testOneEmptyPlatformURLName

public void testOneEmptyPlatformURLName()
test getting platform name from config specified by java URL


testNonExistentConfig

public void testNonExistentConfig()
test trying to use a configuration that doesn't exist


testBadConfigURL

public void testBadConfigURL()
test trying to use a badly formatted url for configuration


testBadConfig

public void testBadConfig()
test trying to use a configuration with bad XML


testBadConfigMultiCfg

public void testBadConfigMultiCfg()
test trying to use a configuration with bad XML: multiple configurations


testBadConfigNoCfg

public void testBadConfigNoCfg()
test trying to use a configuration with bad XML: zero configurations


testBadConfigMultiRuntime

public void testBadConfigMultiRuntime()
test trying to use a configuration with bad XML: multiple runtimes


verifyTwoAgentPlatform

private void verifyTwoAgentPlatform(jade.jademx.mbean.JadePlatform[] platformMBeans)
verify the platform with two agents

Parameters:
platformMBeans -

testTwoAgentPlatformXML

public void testTwoAgentPlatformXML()
test intantiating a platform with two agents via XML


testEmptyConfig

public void testEmptyConfig()
try testing empty configuration


testEmptyPlatformNoMTP

public void testEmptyPlatformNoMTP()
try testing empty platform with NOMTP specified


suite

public static junit.framework.Test suite()
return the implicit suite of tests

Returns:
the implicit suite of tests


Copyright © 2005-2006 Caboodle Networks, Inc.
LGPL license