lejosunit.tests
Class AssertTest

java.lang.Object
  extended bylejosunit.framework.Assert
      extended bylejosunit.framework.TestCase
          extended bylejosunit.tests.AssertTest
All Implemented Interfaces:
Test
Direct Known Subclasses:
FloatAssertTest

public class AssertTest
extends TestCase

Test class for the Assert class and all the assert methods.

Author:
Jochen Hiller

Constructor Summary
AssertTest(java.lang.String name)
          Constructor to create a test case.
 
Method Summary
static void main(java.lang.String[] args)
          Main program to start the TestRunner at RCX.
protected  void runTest()
          Run one test.
static Test suite()
          Suite method to get all tests to run.
 void testAssertionFailures()
          Tests situations, whereas lejosunit should indicate an assertion.
 void testErrors()
          Tests situations, whereas lejosunit should indicate an error.
 void testExceptionPriority()
          Test, whether exceptions will be handled in the correct way: first should assertion failed error be raisen.
 void testFailArgs()
          Test, whether fail with arguments will work.
 void testFailNoArgs()
          Test, whether fail will work.
 void testLongs()
          Tests longs in combination with strings.
 void testOK()
          tests a lot of situations, whereas lejosunit should indicate a correct execution.
 
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

AssertTest

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

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

main

public static void main(java.lang.String[] args)
Main program to start the TestRunner at RCX.

Parameters:
args - will be ignored

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

testOK

public void testOK()
tests a lot of situations, whereas lejosunit should indicate a correct execution.


testLongs

public void testLongs()
Tests longs in combination with strings. Specified when detecting a bug with long handling in JavaVM.


testAssertionFailures

public void testAssertionFailures()
Tests situations, whereas lejosunit should indicate an assertion. Each test will be encapsulated as an anynomous class.


testErrors

public void testErrors()
Tests situations, whereas lejosunit should indicate an error. Each test will be encapsulated as an anynomous class.


testFailNoArgs

public void testFailNoArgs()
Test, whether fail will work.


testFailArgs

public void testFailArgs()
Test, whether fail with arguments will work.


testExceptionPriority

public void testExceptionPriority()
Test, whether exceptions will be handled in the correct way: first should assertion failed error be raisen.



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