org.jboss.wsf.test
Class JBossWSTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.jboss.wsf.test.JBossWSTest
All Implemented Interfaces:
junit.framework.Test

public abstract class JBossWSTest
extends junit.framework.TestCase

Base class for JBossWS test cases

Author:
Thomas.Diesler@jboss.org, ropalka@redhat.com

Field Summary
protected  org.jboss.logging.Logger log
           
 
Constructor Summary
JBossWSTest()
           
JBossWSTest(java.lang.String name)
           
 
Method Summary
static void assertEquals(org.w3c.dom.Element expElement, org.w3c.dom.Element wasElement)
           
static void assertEquals(org.w3c.dom.Element expElement, org.w3c.dom.Element wasElement, boolean ignoreWhitespace)
           
static void assertEquals(java.lang.Object exp, java.lang.Object was)
           
 java.io.File createResourceFile(java.io.File parent, java.lang.String filename)
           
 java.io.File createResourceFile(java.lang.String filename)
           
 void deploy(java.lang.String archive)
          Deploy the given archive
 void executeCommand(java.lang.String command)
          Execute command in separate process.
 void executeCommand(java.lang.String command, java.io.OutputStream os)
          Execute command in separate process, copy process input to os.
 void executeCommand(java.lang.String command, java.io.OutputStream os, java.lang.String message)
          Execute command in separate process, copy process input to os.
 void executeCommand(java.lang.String command, java.io.OutputStream os, java.lang.String message, java.util.Map<java.lang.String,java.lang.String> env)
          Execute command in separate process, copy process input to os.
 void executeCommand(java.lang.String command, java.lang.String message)
          Execute command in separate process.
 java.io.File getArchiveFile(java.lang.String archive)
           
 java.net.URL getArchiveURL(java.lang.String archive)
           
protected  javax.naming.InitialContext getInitialContext()
          Get the client's env context
protected  javax.naming.InitialContext getInitialContext(java.lang.String clientName)
          Get the client's env context for a given name.
 java.io.File getResourceFile(java.lang.String resource)
           
 java.net.URL getResourceURL(java.lang.String resource)
           
 javax.management.MBeanServerConnection getServer()
           
 java.lang.String getServerHost()
           
 boolean isIntegrationCXF()
           
 boolean isIntegrationMetro()
           
 boolean isIntegrationNative()
           
 boolean isTargetJBoss5()
           
 boolean isTargetJBoss50()
           
 boolean isTargetJBoss51()
           
 boolean isTargetJBoss6()
           
 boolean isTargetJBoss60()
           
 boolean isTargetJBoss61()
           
 void undeploy(java.lang.String archive)
          Undeploy the given archive
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, 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, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

protected org.jboss.logging.Logger log
Constructor Detail

JBossWSTest

public JBossWSTest()

JBossWSTest

public JBossWSTest(java.lang.String name)
Method Detail

executeCommand

public void executeCommand(java.lang.String command)
                    throws java.io.IOException
Execute command in separate process.

Parameters:
command - command to execute
Throws:
java.io.IOException - if I/O error occurs

executeCommand

public void executeCommand(java.lang.String command,
                           java.lang.String message)
                    throws java.io.IOException
Execute command in separate process. If process will fail, display custom message in assertion.

Parameters:
command - command to execute
message - message to display if assertion fails
Throws:
java.io.IOException - if I/O error occurs

executeCommand

public void executeCommand(java.lang.String command,
                           java.io.OutputStream os)
                    throws java.io.IOException
Execute command in separate process, copy process input to os.

Parameters:
command - command to execute
os - output stream to copy process input to. If null, System.out will be used
Throws:
java.io.IOException - if I/O error occurs

executeCommand

public void executeCommand(java.lang.String command,
                           java.io.OutputStream os,
                           java.lang.String message)
                    throws java.io.IOException
Execute command in separate process, copy process input to os. If process will fail, display custom message in assertion.

Parameters:
command - command to execute
os - output stream to copy process input to. If null, System.out will be used
message - message to display if assertion fails
Throws:
java.io.IOException - if I/O error occurs

executeCommand

public void executeCommand(java.lang.String command,
                           java.io.OutputStream os,
                           java.lang.String message,
                           java.util.Map<java.lang.String,java.lang.String> env)
                    throws java.io.IOException
Execute command in separate process, copy process input to os. If process will fail, display custom message in assertion.

Parameters:
command - command to execute
os - output stream to copy process input to. If null, System.out will be used
message - message to display if assertion fails
env - environment
Throws:
java.io.IOException - if I/O error occurs

getServer

public javax.management.MBeanServerConnection getServer()
                                                 throws javax.naming.NamingException
Throws:
javax.naming.NamingException

isTargetJBoss5

public boolean isTargetJBoss5()

isTargetJBoss51

public boolean isTargetJBoss51()

isTargetJBoss50

public boolean isTargetJBoss50()

isTargetJBoss6

public boolean isTargetJBoss6()

isTargetJBoss61

public boolean isTargetJBoss61()

isTargetJBoss60

public boolean isTargetJBoss60()

isIntegrationNative

public boolean isIntegrationNative()

isIntegrationMetro

public boolean isIntegrationMetro()

isIntegrationCXF

public boolean isIntegrationCXF()

deploy

public void deploy(java.lang.String archive)
            throws java.lang.Exception
Deploy the given archive

Throws:
java.lang.Exception

undeploy

public void undeploy(java.lang.String archive)
              throws java.lang.Exception
Undeploy the given archive

Throws:
java.lang.Exception

getServerHost

public java.lang.String getServerHost()

getArchiveFile

public java.io.File getArchiveFile(java.lang.String archive)

getArchiveURL

public java.net.URL getArchiveURL(java.lang.String archive)
                           throws java.net.MalformedURLException
Throws:
java.net.MalformedURLException

getResourceFile

public java.io.File getResourceFile(java.lang.String resource)

getResourceURL

public java.net.URL getResourceURL(java.lang.String resource)
                            throws java.net.MalformedURLException
Throws:
java.net.MalformedURLException

createResourceFile

public java.io.File createResourceFile(java.lang.String filename)

createResourceFile

public java.io.File createResourceFile(java.io.File parent,
                                       java.lang.String filename)

getInitialContext

protected javax.naming.InitialContext getInitialContext(java.lang.String clientName)
                                                 throws javax.naming.NamingException
Get the client's env context for a given name.

Throws:
javax.naming.NamingException

getInitialContext

protected javax.naming.InitialContext getInitialContext()
                                                 throws javax.naming.NamingException
Get the client's env context

Throws:
javax.naming.NamingException

assertEquals

public static void assertEquals(org.w3c.dom.Element expElement,
                                org.w3c.dom.Element wasElement,
                                boolean ignoreWhitespace)

assertEquals

public static void assertEquals(org.w3c.dom.Element expElement,
                                org.w3c.dom.Element wasElement)

assertEquals

public static void assertEquals(java.lang.Object exp,
                                java.lang.Object was)


Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.