Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## things.testing.unit
Class TestCase

    java.lang.Object
      things.testing.unit.TestCase

    public class TestCase

extends java.lang.Object

A test case. This will be used to collect results for a Test.

Version:
  1.0 Version History
  `5`

  , 1.0

  Version History

       EPG - Initial  - 30 NOV 04
       EPG - Re-write - 18 JUN 05

Author:
  Erich P. Gatejen, Erich P. Gatejen

Field Summary
`java.lang.String` | `message`
`java.lang.String` | `name`
`static java.lang.String` | `NAMELESS_NAME`
`Result` | `theResult`

Constructor Summary
`TestCase()` The default constructor.
`TestCase(java.lang.String theName)` The named constructor.

Method Summary
`void` | `abort(java.lang.String msg)` Set an abort result.
`void` | `addValue(java.lang.String name, java.lang.String value)` Add a name/value.
`void` | `comment(java.lang.String msg)` Set a comment result.
`void` | `exception(java.lang.String msg)` Set a exception result.
`void` | `fail(java.lang.String msg)` Set a fail result.
`java.lang.String` | `getCode()` Get the code.
`java.lang.String` | `getMessage()` Get the message for this case.
`Result` | `getResult()` Get the result for this case.
`long` | `getSize()` Get the size value.
`long` | `getTime()` Get the time value in miliseconds.
`java.util.List<NV>` | `getValues()` Get values list.
`void` | `inconclusive(java.lang.String msg)` Set an inconclusive result.
`void` | `pass(java.lang.String msg)` Set a pass result.
`void` | `setCode(java.lang.String theCode)` Set the code.
`void` | `setMessage(java.lang.String message)` Set the message for this case.
`void` | `setSize(long size)` Set the size value.
`void` | `setTime(long time)` Set the time value.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### NAMELESS_NAME

    public static final java.lang.String NAMELESS_NAME

See Also:
  Constant Field Values

### name

    public java.lang.String name

### message

    public java.lang.String message

### theResult

    public Result theResult

Constructor Detail

### TestCase

    public TestCase()

  The default constructor. It will be assumed nameless and waiting.

### TestCase

    public TestCase(java.lang.String theName)

  The named constructor. It will be assumed waiting.

  Parameters:
    `theName` - the name of the case

Method Detail

### getResult

    public Result getResult()

  Get the result for this case.

  Returns:
    the result
  See Also:
    `Result`

### getMessage

    public java.lang.String getMessage()

  Get the message for this case.

  Returns:
    the message

### setMessage

    public void setMessage(java.lang.String message)

  Set the message for this case.

  Parameters:
    `message` - the message

### pass

    public void pass(java.lang.String msg)

  Set a pass result.

  Parameters:
    `msg` - The message associated with this result.

### fail

    public void fail(java.lang.String msg)

  Set a fail result.

  Parameters:
    `msg` - The message associated with this result.

### exception

    public void exception(java.lang.String msg)

  Set a exception result.

  Parameters:
    `msg` - The message associated with this result.

### abort

    public void abort(java.lang.String msg)

  Set an abort result.

  Parameters:
    `msg` - The message associated with this result.

### inconclusive

    public void inconclusive(java.lang.String msg)

  Set an inconclusive result.

  Parameters:
    `msg` - The message associated with this result.

### comment

    public void comment(java.lang.String msg)

  Set a comment result.

  Parameters:
    `msg` - The message associated with this result.

### getSize

    public long getSize()

  Get the size value. This is an optional field. If the field was not set, you will get a negative value.

  Returns:
    the size

### setSize

    public void setSize(long size)

  Set the size value.

  Parameters:
    `size` - the size

### getTime

    public long getTime()

  Get the time value in miliseconds. This is an optional field. If the field was not set, you will get a negative value.

  Returns:
    the time in milliseconds

### setTime

    public void setTime(long time)

  Set the time value. This should be in milliseconds.

  Parameters:
    `time` - the time

### getCode

    public java.lang.String getCode()

  Get the code.

  Returns:
    the code as a String

### setCode

    public void setCode(java.lang.String theCode)

  Set the code.

  Parameters:
    `theCode` - the code

### addValue

    public void addValue(java.lang.String name,
                         java.lang.String value)

  Add a name/value. This will not catch or process any exceptions.

  Parameters:
    `name` - the name
    `value` - the value

### getValues

    public java.util.List<NV> getValues()

  Get values list.

  Returns:
    A list of NVs
  See Also:
    `NV`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Things.