SunSPOT API V3.0


com.sun.spot.testFramework
Interface ITestCases

All Known Implementing Classes:
TestBase

public interface ITestCases

The interface implemented for any class containing test cases.

To use the test framework (loosely based on junit) create a subclass of TestBase.

To start a test run use:
TestRunner tr = new TestRunner();
tr.run(new [your test class]());


Each test case is a public void method in your test class with a name of the form testnn(), where nn is the test number in the range 00 to, currently, 29. Methods are run in numerical order.

To run just one test case override runOnly()

To start running from a test case other than 00 override runFrom()

Also see TestBase.out(String), TestBase.outHex(String, int), setUp() and tearDown() for other methods that can be usefully overridden.


Method Summary
 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
 

Method Detail

setUp

void setUp()
           throws Exception
Implement this method in your test class to define behaviour run before each test.

Throws:
Exception

tearDown

void tearDown()
              throws Exception
Implement this method in your test class to define behaviour run after each test.

Throws:
Exception

test00

void test00()
            throws Exception
Throws:
Exception

test01

void test01()
            throws Exception
Throws:
Exception

test02

void test02()
            throws Exception
Throws:
Exception

test03

void test03()
            throws Exception
Throws:
Exception

test04

void test04()
            throws Exception
Throws:
Exception

test05

void test05()
            throws Exception
Throws:
Exception

test06

void test06()
            throws Exception
Throws:
Exception

test07

void test07()
            throws Exception
Throws:
Exception

test08

void test08()
            throws Exception
Throws:
Exception

test09

void test09()
            throws Exception
Throws:
Exception

test10

void test10()
            throws Exception
Throws:
Exception

test11

void test11()
            throws Exception
Throws:
Exception

test12

void test12()
            throws Exception
Throws:
Exception

test13

void test13()
            throws Exception
Throws:
Exception

test14

void test14()
            throws Exception
Throws:
Exception

test15

void test15()
            throws Exception
Throws:
Exception

test16

void test16()
            throws Exception
Throws:
Exception

test17

void test17()
            throws Exception
Throws:
Exception

test18

void test18()
            throws Exception
Throws:
Exception

test19

void test19()
            throws Exception
Throws:
Exception

test20

void test20()
            throws Exception
Throws:
Exception

test21

void test21()
            throws Exception
Throws:
Exception

test22

void test22()
            throws Exception
Throws:
Exception

test23

void test23()
            throws Exception
Throws:
Exception

test24

void test24()
            throws Exception
Throws:
Exception

test25

void test25()
            throws Exception
Throws:
Exception

test26

void test26()
            throws Exception
Throws:
Exception

test27

void test27()
            throws Exception
Throws:
Exception

test28

void test28()
            throws Exception
Throws:
Exception

test29

void test29()
            throws Exception
Throws:
Exception

setRunner

void setRunner(TestRunner runner)
Don't implement this method in your test class

Parameters:
runner - The test runner that is running these tests

runFrom

int runFrom()
Override this method to select the first test to be run.

Returns:
The number of the first test to be run

testsToBeRun

int[] testsToBeRun()
Override this method to select a set of tests to run

Returns:
An array containing the numbers of tests to run.

runOnly

int runOnly()
Override this method to specify a single test to be run

Returns:
The number of the test to run

SunSPOT API V3.0


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