Class Tester

java.lang.Object
org.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 Details

    • Tester

      public Tester()
  • Method Details

    • 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