com.atlassian.jira.webtest.framework.core
Class TimedAssertions

java.lang.Object
  extended by com.atlassian.jira.webtest.framework.core.TimedAssertions

public final class TimedAssertions
extends Object

Common assertions for timeout-based queries inheriting from PollingQuery.

Since:
v4.3
See Also:
PollingQuery, TimedQuery, TimedCondition

Method Summary
static void assertThat(String message, TimedCondition condition, ConditionAssertions.ConditionAssertion assertion)
           Execute an assertion to check if a given condition is true, or false by given timeout, and with client-supplied custom message.
static
<T> void
assertThat(String message, TimedQuery<T> query, QueryAssertions.QueryAssertion<T> assertion)
           Build an assertion to verify if result of given query fulfils certain conditions (involving timeout) specified by given assertion.
static void assertThat(TimedCondition condition, ConditionAssertions.ConditionAssertion assertion)
           Execute an assertion to check if a given condition is true, or false by given timeout.
static
<T> void
assertThat(TimedQuery<T> query, QueryAssertions.QueryAssertion<T> assertion)
           Build an assertion to verify if result of given query fulfils certain conditions (involving timeout) specified by given assertion.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

assertThat

public static void assertThat(TimedCondition condition,
                              ConditionAssertions.ConditionAssertion assertion)

Execute an assertion to check if a given condition is true, or false by given timeout. This method will produce a default assertion failure message, consisting of name of the condition (as returned by its toString() method) and the timeout that was used to evaluate it.

The assertion argument is supposed to be created using condition builders supplied by static methods of this class.

Parameters:
condition - condition to verify
assertion - assertion to execute
See Also:
ConditionAssertions.ConditionAssertion, ConditionAssertions.isTrue(), ConditionAssertions.isFalse(), ConditionAssertions.by(long), ConditionAssertions.byDefaultTimeout(), ConditionAssertions.now()

assertThat

public static void assertThat(String message,
                              TimedCondition condition,
                              ConditionAssertions.ConditionAssertion assertion)

Execute an assertion to check if a given condition is true, or false by given timeout, and with client-supplied custom message. The custom failure message will be prepended to the default one, produced as described in assertThat(com.atlassian.jira.webtest.framework.core.condition.TimedCondition, com.atlassian.jira.webtest.framework.core.ConditionAssertions.ConditionAssertion)

The assertion is supposed to be created using condition builders supplied by static methods of ConditionAssertions.

Parameters:
message - message to include when the assertion fails
condition - condition to verify
assertion - assertion to execute
See Also:
ConditionAssertions.ConditionAssertion, ConditionAssertions.ConditionAssertion, ConditionAssertions.isTrue(), ConditionAssertions.isFalse(), ConditionAssertions.by(long), ConditionAssertions.byDefaultTimeout(), ConditionAssertions.now()

assertThat

public static <T> void assertThat(TimedQuery<T> query,
                                  QueryAssertions.QueryAssertion<T> assertion)

Build an assertion to verify if result of given query fulfils certain conditions (involving timeout) specified by given assertion.

Assertion instances are meant to be created via static factory methods in QueryAssertions that create QueryAssertions.QueryAssertionBuilders (that may further be used to create target QueryAssertions.QueryAssertion instances).

Parameters:
query - timed query to verify
assertion - object specifying the assertion
See Also:
QueryAssertions.QueryAssertionBuilder

assertThat

public static <T> void assertThat(String message,
                                  TimedQuery<T> query,
                                  QueryAssertions.QueryAssertion<T> assertion)

Build an assertion to verify if result of given query fulfils certain conditions (involving timeout) specified by given assertion. Provide additional custom message to provide contextual failure messages.

The message parameter will be prepended to the default failure message.

Assertion instances are meant to be created via static factory methods in QueryAssertions that create QueryAssertions.QueryAssertionBuilders (that may further be used to create target QueryAssertions.QueryAssertion instances).

Parameters:
message - custom failure message
query - timed query to verify
assertion - object specifying the assertion
See Also:
QueryAssertions.QueryAssertionBuilder


Copyright © 2002-2013 Atlassian. All Rights Reserved.