org.uispec4j.assertion
Class UISpecAssert

java.lang.Object
  extended by org.uispec4j.assertion.UISpecAssert

public class UISpecAssert
extends java.lang.Object

Checks the validity of Assertion objects.

See Also:
Using Assertions

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(java.lang.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(java.lang.String message, Assertion assertion)
          Checks the given assertion fails (with a retry strategy).
static void assertThat(Assertion assertion)
          Checks that the given assertion succeeds (with a retry strategy).
static void assertThat(java.lang.String message, Assertion assertion)
          Checks that the given assertion succeeds (with a retry strategy).
static void assertTrue(Assertion assertion)
          Checks that the given assertion succeeds (with a retry strategy).
static void assertTrue(java.lang.String message, Assertion assertion)
          Checks that the given assertion succeeds (with a retry strategy).
static void fail()
           
static void fail(java.lang.String message)
           
static Assertion failure(java.lang.String message)
           
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(java.lang.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

assertThat

public static void assertThat(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. This method is equivalent to assertTrue(Assertion).


assertThat

public static void assertThat(java.lang.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. This method is equivalent to assertTrue(String,Assertion).


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. This method is equivalent to assertThat(Assertion).


assertTrue

public static void assertTrue(java.lang.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. This method is equivalent to assertThat(Assertion).


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(java.lang.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 (in milliseconds) is reached.


waitUntil

public static void waitUntil(java.lang.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 (in milliseconds) 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(java.lang.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.


fail

public static void fail()

fail

public static void fail(java.lang.String message)

failure

public static Assertion failure(java.lang.String message)


Copyright © 2004-2010. All Rights Reserved.