org.jboss.test
Class BaseTestCase

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.jboss.test.BaseTestCase
All Implemented Interfaces:
junit.framework.Test

public class BaseTestCase
extends junit.framework.TestCase

Base Test Case.

Version:
$Revision: 1.6 $
Author:
Adrian Brock

Field Summary
protected  org.jboss.logging.Logger log
          The log
 
Constructor Summary
BaseTestCase(String name)
          Create a new base test case
 
Method Summary
protected  void assertEquals(double one, double two)
          Assert two double values are equal
protected  void assertEquals(float one, float two)
          Assert two float values are equal
protected  void assertEquals(Object[] expected, Object[] actual)
          Assert to arrays are equal
protected  void assertEquals(String context, Object[] expected, Object[] actual)
          Assert to arrays are equal
protected  void checkThrowable(Class expected, Throwable throwable)
           
protected  void configureLogging()
          Callback for configuring logging at the start of the test
protected  void enableTrace(String name)
          Enable trace for a logging category
 org.jboss.logging.Logger getLog()
          Get the log for this test
protected  void setUp()
           
protected  void tearDown()
           
 
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, failNotEquals, failNotSame, failSame
 
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
The log

Constructor Detail

BaseTestCase

public BaseTestCase(String name)
Create a new base test case

Parameters:
name - the test name
Method Detail

getLog

public org.jboss.logging.Logger getLog()
Get the log for this test

Returns:
the log

setUp

protected void setUp()
              throws Exception
Throws:
Exception

tearDown

protected void tearDown()
                 throws Exception
Throws:
Exception

configureLogging

protected void configureLogging()
Callback for configuring logging at the start of the test


enableTrace

protected void enableTrace(String name)
Enable trace for a logging category

Parameters:
name - the logging category

assertEquals

protected void assertEquals(float one,
                            float two)
Assert two float values are equal

Parameters:
one - the expected value
two - the actual value

assertEquals

protected void assertEquals(double one,
                            double two)
Assert two double values are equal

Parameters:
one - the expected value
two - the actual value

assertEquals

protected void assertEquals(Object[] expected,
                            Object[] actual)
Assert to arrays are equal

Parameters:
expected - the expected array
actual - the actual array

assertEquals

protected void assertEquals(String context,
                            Object[] expected,
                            Object[] actual)
Assert to arrays are equal

Parameters:
context - the context
expected - the expected array
actual - the actual array

checkThrowable

protected void checkThrowable(Class expected,
                              Throwable throwable)


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.