SunSPOT API V3.0


com.sun.spot.testFramework
Class TestBase

java.lang.Object
  extended by junit.framework.Assert
      extended by com.sun.spot.testFramework.TestBase
All Implemented Interfaces:
ITestCases

public abstract class TestBase
extends Assert
implements ITestCases

The abstract superclass for any class containing test cases.

See ITestCases for details of use.


Constructor Summary
TestBase()
           
 
Method Summary
protected  boolean areAlmostEqual(long expected, long actual, long delta)
           
protected  void assertAlmostEqual(String message, long expected, long actual, long delta)
           
protected  void out(String msg)
          Print out a message.
protected  void outHex(String msg, int value)
          Print out a message and a hexadecimal value
 int runFrom()
          Override this method to select the first test to be run.
 int runOnly()
          Override this method to specify a single test to be run
 void setRunner(TestRunner runner)
          Don't implement this method in your test class
 void setUp()
          Implement this method in your test class to define behaviour run before each test.
 void tearDown()
          Implement this method in your test class to define behaviour run after each test.
 void test00()
           
 void test01()
           
 void test02()
           
 void test03()
           
 void test04()
           
 void test05()
           
 void test06()
           
 void test07()
           
 void test08()
           
 void test09()
           
 void test10()
           
 void test11()
           
 void test12()
           
 void test13()
           
 void test14()
           
 void test15()
           
 void test16()
           
 void test17()
           
 void test18()
           
 void test19()
           
 void test20()
           
 void test21()
           
 void test22()
           
 void test23()
           
 void test24()
           
 void test25()
           
 void test26()
           
 void test27()
           
 void test28()
           
 void test29()
           
 int[] testsToBeRun()
          Override this method to select a set of tests to run
 
Methods inherited from class junit.framework.Assert
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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestBase

public TestBase()
Method Detail

runOnly

public int runOnly()
Description copied from interface: ITestCases
Override this method to specify a single test to be run

Specified by:
runOnly in interface ITestCases
Returns:
The number of the test to run

runFrom

public int runFrom()
Description copied from interface: ITestCases
Override this method to select the first test to be run.

Specified by:
runFrom in interface ITestCases
Returns:
The number of the first test to be run

testsToBeRun

public int[] testsToBeRun()
Description copied from interface: ITestCases
Override this method to select a set of tests to run

Specified by:
testsToBeRun in interface ITestCases
Returns:
An array containing the numbers of tests to run.

setUp

public void setUp()
           throws Exception
Description copied from interface: ITestCases
Implement this method in your test class to define behaviour run before each test.

Specified by:
setUp in interface ITestCases
Throws:
Exception

tearDown

public void tearDown()
              throws Exception
Description copied from interface: ITestCases
Implement this method in your test class to define behaviour run after each test.

Specified by:
tearDown in interface ITestCases
Throws:
Exception

test00

public void test00()
            throws Exception
Specified by:
test00 in interface ITestCases
Throws:
Exception

test01

public void test01()
            throws Exception
Specified by:
test01 in interface ITestCases
Throws:
Exception

test02

public void test02()
            throws Exception
Specified by:
test02 in interface ITestCases
Throws:
Exception

test03

public void test03()
            throws Exception
Specified by:
test03 in interface ITestCases
Throws:
Exception

test04

public void test04()
            throws Exception
Specified by:
test04 in interface ITestCases
Throws:
Exception

test05

public void test05()
            throws Exception
Specified by:
test05 in interface ITestCases
Throws:
Exception

test06

public void test06()
            throws Exception
Specified by:
test06 in interface ITestCases
Throws:
Exception

test07

public void test07()
            throws Exception
Specified by:
test07 in interface ITestCases
Throws:
Exception

test08

public void test08()
            throws Exception
Specified by:
test08 in interface ITestCases
Throws:
Exception

test09

public void test09()
            throws Exception
Specified by:
test09 in interface ITestCases
Throws:
Exception

test10

public void test10()
            throws Exception
Specified by:
test10 in interface ITestCases
Throws:
Exception

test11

public void test11()
            throws Exception
Specified by:
test11 in interface ITestCases
Throws:
Exception

test12

public void test12()
            throws Exception
Specified by:
test12 in interface ITestCases
Throws:
Exception

test13

public void test13()
            throws Exception
Specified by:
test13 in interface ITestCases
Throws:
Exception

test14

public void test14()
            throws Exception
Specified by:
test14 in interface ITestCases
Throws:
Exception

test15

public void test15()
            throws Exception
Specified by:
test15 in interface ITestCases
Throws:
Exception

test16

public void test16()
            throws Exception
Specified by:
test16 in interface ITestCases
Throws:
Exception

test17

public void test17()
            throws Exception
Specified by:
test17 in interface ITestCases
Throws:
Exception

test18

public void test18()
            throws Exception
Specified by:
test18 in interface ITestCases
Throws:
Exception

test19

public void test19()
            throws Exception
Specified by:
test19 in interface ITestCases
Throws:
Exception

test20

public void test20()
            throws Exception
Specified by:
test20 in interface ITestCases
Throws:
Exception

test21

public void test21()
            throws Exception
Specified by:
test21 in interface ITestCases
Throws:
Exception

test22

public void test22()
            throws Exception
Specified by:
test22 in interface ITestCases
Throws:
Exception

test23

public void test23()
            throws Exception
Specified by:
test23 in interface ITestCases
Throws:
Exception

test24

public void test24()
            throws Exception
Specified by:
test24 in interface ITestCases
Throws:
Exception

test25

public void test25()
            throws Exception
Specified by:
test25 in interface ITestCases
Throws:
Exception

test26

public void test26()
            throws Exception
Specified by:
test26 in interface ITestCases
Throws:
Exception

test27

public void test27()
            throws Exception
Specified by:
test27 in interface ITestCases
Throws:
Exception

test28

public void test28()
            throws Exception
Specified by:
test28 in interface ITestCases
Throws:
Exception

test29

public void test29()
            throws Exception
Specified by:
test29 in interface ITestCases
Throws:
Exception

setRunner

public void setRunner(TestRunner runner)
Description copied from interface: ITestCases
Don't implement this method in your test class

Specified by:
setRunner in interface ITestCases
Parameters:
runner - The test runner that is running these tests

out

protected void out(String msg)
Print out a message.

Parameters:
msg - the message to print

outHex

protected void outHex(String msg,
                      int value)
Print out a message and a hexadecimal value

Parameters:
msg - the message
value - the hex value

assertAlmostEqual

protected void assertAlmostEqual(String message,
                                 long expected,
                                 long actual,
                                 long delta)

areAlmostEqual

protected boolean areAlmostEqual(long expected,
                                 long actual,
                                 long delta)

SunSPOT API V3.0


Copyright © 2006, 2007 Sun Microsystems, Inc. All Rights Reserved.