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

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

public final class QueryAssertions
extends Object

Common assertions for TimedQuery with meaningful error messages.

Since:
4.3

Nested Class Summary
static class QueryAssertions.QueryAssertion<V>
           
static interface QueryAssertions.QueryAssertionBuilder<V>
          Used to build the target query assertion that is performed in one of the timeout modes: now() - immediately byDefaultTimeout() - by the tested query's default timeout by(long) - by client-supplied timeout
 
Method Summary
static
<T> QueryAssertions.QueryAssertionBuilder<T>
isEqual(T expected)
          Query assertion builder for the 'is equal' assertion - to verify that a return value from any given timed query is equal to an expected value.
static
<T> QueryAssertions.QueryAssertionBuilder<T>
isNotNull()
           Query assertion builder for 'is not null' assertion, verifying that return values from timed queries are non-null.
static
<T> QueryAssertions.QueryAssertionBuilder<T>
isNotNull(Class<T> targetType)
           Query assertion builder for 'is not null' assertion, verifying that return values from timed queries are non-null.
static
<T> QueryAssertions.QueryAssertionBuilder<T>
isNull()
           Query assertion builder for 'is null' assertion, verifying that return values from timed queries are null.
static
<T> QueryAssertions.QueryAssertionBuilder<T>
isNull(Class<T> targetType)
           Query assertion builder for 'is null' assertion, verifying that return values from timed queries are null.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isEqual

public static <T> QueryAssertions.QueryAssertionBuilder<T> isEqual(T expected)
Query assertion builder for the 'is equal' assertion - to verify that a return value from any given timed query is equal to an expected value.

Type Parameters:
T - type of the return value
Parameters:
expected - expected result value of the query
Returns:
query assertion builder for 'is equal' assertions

isNotNull

public static <T> QueryAssertions.QueryAssertionBuilder<T> isNotNull(Class<T> targetType)

Query assertion builder for 'is not null' assertion, verifying that return values from timed queries are non-null.

This method will must be used in places, where the compiler is not able to infer the type of the timed query returned value

Type Parameters:
T - type parameter of the query return value
Parameters:
targetType - class of the query return value
Returns:
new query assertion builder for 'not null' assertions
See Also:
isNotNull()

isNotNull

public static <T> QueryAssertions.QueryAssertionBuilder<T> isNotNull()

Query assertion builder for 'is not null' assertion, verifying that return values from timed queries are non-null.

Type Parameters:
T - type parameter of the query return value
Returns:
new query assertion builder for 'not null' assertions
See Also:
isNotNull(Class)

isNull

public static <T> QueryAssertions.QueryAssertionBuilder<T> isNull(Class<T> targetType)

Query assertion builder for 'is null' assertion, verifying that return values from timed queries are null.

This method will must be used in places, where the compiler is not able to infer the type of the timed query returned value

Type Parameters:
T - type parameter of the query return value
Parameters:
targetType - class of the query return value
Returns:
new query assertion builder for 'is null' assertions
See Also:
isNotNull()

isNull

public static <T> QueryAssertions.QueryAssertionBuilder<T> isNull()

Query assertion builder for 'is null' assertion, verifying that return values from timed queries are null.

Type Parameters:
T - type parameter of the query return value
Returns:
new query assertion builder for 'null' assertions
See Also:
isNotNull(Class)


Copyright © 2002-2013 Atlassian. All Rights Reserved.