lejosunit.examples
Class OneTest

java.lang.Object
  extended bylejosunit.framework.Assert
      extended bylejosunit.framework.TestCase
          extended bylejosunit.examples.OneTest
All Implemented Interfaces:
Test

public class OneTest
extends TestCase

Example test case class.

Author:
Jochen Hiller

Constructor Summary
OneTest(java.lang.String name)
          Constructor to create a test case.
 
Method Summary
protected  void runTest()
          Run one test.
static Test suite()
          Suite method to get all tests to run.
 void testOne()
          A test, which will raise an AssertionFailureException.
 void testTwo()
          A test, which will raise an Error.
 
Methods inherited from class lejosunit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, setUp, tearDown, toString
 
Methods inherited from class lejosunit.framework.Assert
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, failSame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OneTest

public OneTest(java.lang.String name)
Constructor to create a test case.

Parameters:
name - the nane of the test case
Method Detail

suite

public static Test suite()
Suite method to get all tests to run.

Returns:
the whole test suite

runTest

protected void runTest()
                throws java.lang.Throwable
Run one test. Do the dispatch here.

Specified by:
runTest in class TestCase
Throws:
java.lang.Throwable - a general error

testOne

public void testOne()
A test, which will raise an AssertionFailureException.


testTwo

public void testTwo()
A test, which will raise an Error.



Copyright (C) 2003 Jochen Hiller. All Rights Reserved.