org.astrogrid.samp.test
Class Tester

java.lang.Object
  extended byorg.astrogrid.samp.test.Tester
Direct Known Subclasses:
Calculator, HubTester

public class Tester
extends Object

No-frills test case superclass.

Since:
18 Jul 2008
Author:
Mark Taylor

Constructor Summary
Tester()
           
 
Method Summary
static void assertEquals(int i1, int i2)
          Tests integer equality.
static void assertEquals(Object o1, Object o2)
          Tests object equality.
static void assertTrue(boolean test)
          Tests an assertion.
static void fail()
          Fails a test.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Tester

public Tester()
Method Detail

fail

public static void fail()
                 throws TestException
Fails a test.

Throws:
TextException - always
TestException

assertTrue

public static void assertTrue(boolean test)
                       throws TestException
Tests an assertion.

Parameters:
test - asserted condition
Throws:
TestException - if test is false

assertEquals

public static void assertEquals(Object o1,
                                Object o2)
                         throws TestException
Tests object equality.

Parameters:
o1 - object 1
o2 - object 2
Throws:
TestException - unless o1 and o2 are both null or are equal in the sense of Object.equals(java.lang.Object)

assertEquals

public static void assertEquals(int i1,
                                int i2)
                         throws TestException
Tests integer equality.

Parameters:
i1 - integer 1
i2 - integer 2
Throws:
TestException - iff i1 != i2


Copyright © 2008 AstroGrid. All Rights Reserved.