org.uispec4j.assertion
Class UISpecAssert

java.lang.Object
  extended byorg.uispec4j.assertion.UISpecAssert

public class UISpecAssert
extends Object

Checks the validity of Assertion objects.

These methods are not meant to be used directly from within tests - you can use them through UISpecTestCase or your own TestCase implementation.


Constructor Summary
UISpecAssert()
           
 
Method Summary
static Assertion and(Assertion[] assertions)
          Returns the intersection of the Assertion parameters.
static void assertEquals(boolean expected, Assertion assertion)
          Checks the given assertion equals the expected parameter (with a retry strategy).
static void assertEquals(String message, boolean expected, Assertion assertion)
          Checks the given assertion equals the expected parameter (with a retry strategy).
static void assertFalse(Assertion assertion)
          Checks that the given assertion fails (with a retry strategy).
static void assertFalse(String message, Assertion assertion)
          Checks the given assertion fails (with a retry strategy).
static void assertTrue(Assertion assertion)
          Checks that the given assertion succeeds (with a retry strategy).
static void assertTrue(String message, Assertion assertion)
          Checks that the given assertion succeeds (with a retry strategy).
static Assertion not(Assertion assertion)
          Returns a negation of the given assertion.
static Assertion or(Assertion[] assertions)
          Returns the union of the Assertion parameters.
static void waitUntil(Assertion assertion, long waitTimeLimit)
          Waits until the given assertion becomes true.
static void waitUntil(String message, Assertion assertion, long waitTimeLimit)
          Waits until the given assertion becomes true.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UISpecAssert

public UISpecAssert()
Method Detail

assertTrue

public static void assertTrue(Assertion assertion)
Checks that the given assertion succeeds (with a retry strategy). The Assertion.check() method is called until the timeout specified by UISpec4J.setAssertionTimeLimit(long) is reached.


assertTrue

public static void assertTrue(String message,
                              Assertion assertion)
Checks that the given assertion succeeds (with a retry strategy). The Assertion.check() method is called until the timeout specified by UISpec4J.setAssertionTimeLimit(long) is reached. If it fails an AssertionFailedError is thrown with the given message.


assertFalse

public static void assertFalse(Assertion assertion)
Checks that the given assertion fails (with a retry strategy). The Assertion.check() method is called until the timeout specified by UISpec4J.setAssertionTimeLimit(long) is reached.


assertFalse

public static void assertFalse(String message,
                               Assertion assertion)
Checks the given assertion fails (with a retry strategy). The Assertion.check() method is called until the timeout specified by UISpec4J.setAssertionTimeLimit(long) is reached. If it succeeds an AssertionFailedError is thrown with the given message.


waitUntil

public static void waitUntil(Assertion assertion,
                             long waitTimeLimit)
Waits until the given assertion becomes true. The Assertion.check() method is called until the timeout specified as parameter is reached.


waitUntil

public static void waitUntil(String message,
                             Assertion assertion,
                             long waitTimeLimit)
Waits until the given assertion becomes true. The Assertion.check() method is called until the timeout specified as parameter is reached. If it fails an AssertionFailedError is thrown with the given message.


assertEquals

public static void assertEquals(boolean expected,
                                Assertion assertion)
Checks the given assertion equals the expected parameter (with a retry strategy). The Assertion.check() method is called until the timeout specified by UISpec4J.setAssertionTimeLimit(long) is reached.


assertEquals

public static void assertEquals(String message,
                                boolean expected,
                                Assertion assertion)
Checks the given assertion equals the expected parameter (with a retry strategy). The Assertion.check() method is called until the timeout specified by UISpec4J.setAssertionTimeLimit(long) is reached. If it fails an AssertionFailedError is thrown with the given message.


not

public static Assertion not(Assertion assertion)
Returns a negation of the given assertion.


and

public static Assertion and(Assertion[] assertions)
Returns the intersection of the Assertion parameters.


or

public static Assertion or(Assertion[] assertions)
Returns the union of the Assertion parameters.



Copyright © 2004-2007 Design-up. All Rights Reserved.