Skip navigation links
A B C D E F G H I K M N O P R S T U V 

A

accessor(Class<A>, Class<B>, String) - Static method in class com.atlassian.utt.reflect.ReflectionFunctions
Using reflection, returns a NamedFunction that will call a zero-argument method on its target, or get the value of a field.
after() - Method in class com.atlassian.utt.logging.CapturedLogging
 
answer(InvocationOnMock) - Method in class com.atlassian.utt.mock.FlipFlop
 
answer(InvocationOnMock) - Method in class com.atlassian.utt.mock.Strict
Throws an exception that reports the unexpected method invocation.
apply(A) - Method in class com.atlassian.utt.matchers.NamedFunction
Delegates the input to the wrapped function.
assertThrows(Class<? extends Throwable>, ExceptionMatchers.ThrowingRunnable) - Static method in class com.atlassian.utt.matchers.ExceptionMatchers
Convenience method for ExceptionMatchers.assertThrows(String, Class, ThrowingRunnable) with null for the message.
assertThrows(String, Class<? extends Throwable>, ExceptionMatchers.ThrowingRunnable) - Static method in class com.atlassian.utt.matchers.ExceptionMatchers
Convenience method for ExceptionMatchers.assertThrows(String, Matcher, ThrowingRunnable) with instanceOf(expected) for the matcher.
assertThrows(Matcher<Throwable>, ExceptionMatchers.ThrowingRunnable) - Static method in class com.atlassian.utt.matchers.ExceptionMatchers
Convenience method for ExceptionMatchers.assertThrows(String, Matcher, ThrowingRunnable) with null for the message.
assertThrows(String, Matcher<Throwable>, ExceptionMatchers.ThrowingRunnable) - Static method in class com.atlassian.utt.matchers.ExceptionMatchers
This is similar to using the expected parameter on a @Test annotation or the ExpectedException @Rule, except that it can be used conveniently within the test flow.
authChallenge(String) - Static method in class com.atlassian.utt.http.TestHttpServer
Constructs a TestHttpServer.ResponseProperties instance with a 401 (unauthorized) status and a WWW-Authenticate header.
await() - Method in class com.atlassian.utt.concurrency.Barrier
Waits Barrier.DEFAULT_TIMEOUT for the barrier to be signalled.
await(long) - Method in class com.atlassian.utt.concurrency.Barrier
Waits the specified time in milliseconds for the barrier to be signalled.

B

Barrier - Class in com.atlassian.utt.concurrency
Simple self-timing-out barrier for building multi-threaded tests.
Barrier() - Constructor for class com.atlassian.utt.concurrency.Barrier
 
BASIC_AUTH_CHALLENGE - Static variable in class com.atlassian.utt.http.TestHttpServer
Use this constant with TestHttpServer.authChallenge(java.lang.String) or TestHttpServer.proxyAuthChallenge(java.lang.String) in a test response to simulate a basicauth challenge.
before() - Method in class com.atlassian.utt.logging.CapturedLogging
 
body(String) - Method in class com.atlassian.utt.http.TestHttpServer.ResponseProperties
Returns a new ResponseProperties instance based on the current instance, but adding the specified response body.

C

CapturedLogging - Class in com.atlassian.utt.logging
A JUnit Rule for capturing and verifying log messages from a given class.
CapturedLogging(Class) - Constructor for class com.atlassian.utt.logging.CapturedLogging
 
catching(ExceptionMatchers.ThrowingRunnable) - Static method in class com.atlassian.utt.matchers.ExceptionMatchers
Runs the ExceptionMatchers.ThrowingRunnable, catches any exception that it throws, and returns it wrapped up as a CatchResult that can be asserted against with ExceptionMatchers.caught(Matcher) or ExceptionMatchers.caughtNothing().
caught(Class<? extends Throwable>) - Static method in class com.atlassian.utt.matchers.ExceptionMatchers
A matcher for use with ExceptionMatchers.catching(ThrowingRunnable) which asserts that it throws an exception of the specified type.
caught(Matcher<Throwable>) - Static method in class com.atlassian.utt.matchers.ExceptionMatchers
A matcher for use with ExceptionMatchers.catching(ThrowingRunnable) which asserts that it throws an exception that matches the given condition.
caughtNothing() - Static method in class com.atlassian.utt.matchers.ExceptionMatchers
A matcher for use with ExceptionMatchers.catching(ThrowingRunnable) which asserts that no exception occurred.
cause() - Static method in class com.atlassian.utt.matchers.ExceptionMatchers
Extracts an exception's cause for matching against.
cause(Class<? extends Throwable>) - Static method in class com.atlassian.utt.matchers.ExceptionMatchers
Convenient shorthand for cause().that(instanceOf(expectedClass)).
cause(Matcher<Throwable>) - Static method in class com.atlassian.utt.matchers.ExceptionMatchers
Convenient shorthand for cause().that(matcher).
com.atlassian.utt.concurrency - package com.atlassian.utt.concurrency
 
com.atlassian.utt.http - package com.atlassian.utt.http
 
com.atlassian.utt.logging - package com.atlassian.utt.logging
 
com.atlassian.utt.matchers - package com.atlassian.utt.matchers
 
com.atlassian.utt.mock - package com.atlassian.utt.mock
 
com.atlassian.utt.reflect - package com.atlassian.utt.reflect
 
containsAllStrings(String...) - Static method in class com.atlassian.utt.matchers.GeneralMatchers
Obtain a Matcher<String> which matches if every one of a given strings appears as a substring of the provided string.
create(int) - Static method in class com.atlassian.utt.http.TestHttpServer
Creates a new test server instance.

D

DEFAULT_TIMEOUT - Static variable in class com.atlassian.utt.concurrency.Barrier
The default timeout that will be used by Barrier.await().
DEFAULT_TIMEOUT_PROPERTY - Static variable in class com.atlassian.utt.concurrency.Barrier
A system property that may be used to override the value of Barrier.DEFAULT_TIMEOUT: "com.atlassian.utt.concurrency.Barrier.DEFAULT_TIMEOUT".
didLogDebug(Matcher<String>) - Static method in class com.atlassian.utt.logging.CapturedLogging
Obtain a Matcher which matches a CapturedLogging if a message matching the given messageMatcher was logged at Level.DEBUG.
didLogDebug(String...) - Static method in class com.atlassian.utt.logging.CapturedLogging
Obtain a Matcher which matches a CapturedLogging if a single message containing all the given substrings was logged at Level.DEBUG.
didLogError(Matcher<String>) - Static method in class com.atlassian.utt.logging.CapturedLogging
Obtain a Matcher which matches a CapturedLogging if a message matching the given messageMatcher was logged at Level.ERROR.
didLogError(String...) - Static method in class com.atlassian.utt.logging.CapturedLogging
Obtain a Matcher which matches a CapturedLogging if a single message containing all the given substrings was logged at Level.ERROR.
didLogInfo(Matcher<String>) - Static method in class com.atlassian.utt.logging.CapturedLogging
Obtain a Matcher which matches a CapturedLogging if a message matching the given messageMatcher was logged at Level.INFO.
didLogInfo(String...) - Static method in class com.atlassian.utt.logging.CapturedLogging
Obtain a Matcher which matches a CapturedLogging if a single message containing all the given substrings was logged at Level.INFO.
didLogWarn(Matcher<String>) - Static method in class com.atlassian.utt.logging.CapturedLogging
Obtain a Matcher which matches a CapturedLogging if a message matching the given messageMatcher was logged at Level.WARN.
didLogWarn(String...) - Static method in class com.atlassian.utt.logging.CapturedLogging
Obtain a Matcher which matches a CapturedLogging if a single message containing all the given substrings was logged at Level.WARN.
DIGEST_AUTH_CHALLENGE - Static variable in class com.atlassian.utt.http.TestHttpServer
Use this constant with TestHttpServer.authChallenge(java.lang.String) or TestHttpServer.proxyAuthChallenge(java.lang.String) in a test response to simulate a digest authentication challenge.

E

everyItemIs(Matcher<? super T>) - Static method in class com.atlassian.utt.matchers.GeneralMatchers
This method is exactly equivalent to Matchers.everyItem(Matcher) except for its generic signature; everyItem takes a Matcher<T>, whereas this method takes a Matcher<? super T>.
ExceptionMatchers - Class in com.atlassian.utt.matchers
Convenient assertions related to exceptions and the tests that throw them.
ExceptionMatchers() - Constructor for class com.atlassian.utt.matchers.ExceptionMatchers
 
ExceptionMatchers.CatchResult - Class in com.atlassian.utt.matchers
Holder for the exception thrown by a ExceptionMatchers.ThrowingRunnable.
ExceptionMatchers.ThrowingRunnable - Interface in com.atlassian.utt.matchers
Like Runnable, but permits checked exceptions to be thrown.

F

flip() - Method in class com.atlassian.utt.mock.FlipFlop
Flips between answer0 and answer1.
FlipFlop<T> - Class in com.atlassian.utt.mock
An answer that can flip back and forth between two other answers.
FlipFlop(Answer<?>, Answer<?>) - Constructor for class com.atlassian.utt.mock.FlipFlop
Creates a flip-flop that will switch back and forth between answer0 and answer1.
flipFlop(Answer<?>) - Static method in class com.atlassian.utt.mock.MoreAnswers
A factory for a flip-flop answer that initially uses the RETURNS_DEFAULTS setting, but switches to the provided answer1 when flipped.
flipFlop(Answer<?>, Answer<?>) - Static method in class com.atlassian.utt.mock.MoreAnswers
A factory for flip-flop answers.
forRunnable(String, Runnable) - Static method in class com.atlassian.utt.concurrency.TestThread
This static factory converts a Runnable into a test thread.
forStatement(String, Statement) - Static method in class com.atlassian.utt.concurrency.TestThread
This static factory converts a unit testing Statement into a test thread.

G

GeneralMatchers - Class in com.atlassian.utt.matchers
Miscellaneous Hamcrest matchers.
GeneralMatchers() - Constructor for class com.atlassian.utt.matchers.GeneralMatchers
 
getBaseUri() - Method in class com.atlassian.utt.http.TestHttpServer
 
getDefaultTimeout() - Static method in class com.atlassian.utt.concurrency.Barrier
Returns the Barrier.DEFAULT_TIMEOUT, or whatever value Barrier.DEFAULT_TIMEOUT_PROPERTY specified to override it with.
getName() - Method in class com.atlassian.utt.matchers.NamedFunction
Returns the descriptive name of this function.
getUncaughtException() - Method in class com.atlassian.utt.concurrency.TestThread
Returns the exception that terminated this thread.
go() - Method in class com.atlassian.utt.concurrency.TestThread
The actual test thread implementation, which is free to throw whatever exceptions it likes.

H

hasValueThat(Matcher<? super T>) - Static method in class com.atlassian.utt.matchers.OptionalMatchers
Match a non-empty Optional whose value matches a given matcher.
hasValueThatIs(T) - Static method in class com.atlassian.utt.matchers.OptionalMatchers
Match a non-empty Optional whose value is equal to a given value.
header(String) - Static method in class com.atlassian.utt.http.TestHttpServer.RequestProperties
Use this to construct a Hamcrest matcher for a single expected request header.
header(String, String) - Method in class com.atlassian.utt.http.TestHttpServer.ResponseProperties
Returns a new ResponseProperties instance based on the current instance, but adding the specified response header.
headers() - Static method in class com.atlassian.utt.http.TestHttpServer.RequestProperties
Use this to construct a Hamcrest matcher for the headers of an expected request, represented as a multi-valued Map.

I

is(Matcher<? super B>) - Method in class com.atlassian.utt.matchers.NamedFunction
Returns a Matcher that passes its target through the wrapped function and then delegates to another matcher.
is(B) - Method in class com.atlassian.utt.matchers.NamedFunction
Shortcut for is(equalTo(value)).
isEmpty() - Static method in class com.atlassian.utt.matchers.OptionalMatchers
Match an Optional exactly when it is empty.
isFlipped() - Method in class com.atlassian.utt.mock.FlipFlop
Returns true if currently flipped (using answer1); false if still using answer0.
isPresent() - Static method in class com.atlassian.utt.matchers.OptionalMatchers
Match an Optional exactly when it is present.
isPrintUnexpectedRequests() - Method in class com.atlassian.utt.http.TestHttpServer
Returns true if unmatched HTTP requests will be logged to the console.
iterableAccessor(Class<A>, Class<B>, String) - Static method in class com.atlassian.utt.reflect.ReflectionFunctions
Similar to ReflectionFunctions.accessor(Class, Class, String), but for methods or fields with an Iterable type.

K

kill() - Method in class com.atlassian.utt.concurrency.TestThread
Forcibly kill this thread and report what its stack apparently was at the time we killed it.

M

matchAs(Class<T>, Class<U>, Matcher<? super U>) - Static method in class com.atlassian.utt.matchers.GeneralMatchers
Asserts that the target object, declared as fromClass, is also an instance of matchClass; then casts it to matchClass and asserts the specified matcher.
MatcherUtil - Class in com.atlassian.utt.matchers
Utilities for testing matchers.
MatcherUtil() - Constructor for class com.atlassian.utt.matchers.MatcherUtil
 
message() - Static method in class com.atlassian.utt.matchers.ExceptionMatchers
Extracts an exception's message for matching against.
message(String) - Static method in class com.atlassian.utt.matchers.ExceptionMatchers
Convenient shorthand for message().NamedFeature.thatIs(Object) thatIs}(message).
message(Matcher<String>) - Static method in class com.atlassian.utt.matchers.ExceptionMatchers
Convenient shorthand for message().that(matcher).
messageContains(String...) - Static method in class com.atlassian.utt.matchers.ExceptionMatchers
Convenient shorthand for message().that(orderedSubstrings(orderedSubstrings)).
method() - Static method in class com.atlassian.utt.http.TestHttpServer.RequestProperties
Use this to construct a Hamcrest matcher for the HTTP method of an expected request.
MoreAnswers - Class in com.atlassian.utt.mock
Factories for the answer types provided by this library.

N

NamedFeature<T,U> - Class in com.atlassian.utt.matchers
Provides utility functions for creating FeatureMatcher instances.
namedFeature(String, String, Function<T, U>) - Static method in class com.atlassian.utt.matchers.NamedFeature
Create a named feature given descriptive strings and an extractor function.
NamedFunction<A,B> - Class in com.atlassian.utt.matchers
Decorates a Function with a descriptive name, and allows you to compose it with a Matcher.
namedFunction(String, Function<A, B>) - Static method in class com.atlassian.utt.matchers.NamedFunction
 
namedFunction(String, Function<A, B>) - Static method in class com.atlassian.utt.matchers.NamedFunction
 

O

OptionalMatchers - Class in com.atlassian.utt.matchers
Provides Matcher implementations for Jdk 8 optionals.
OptionalMatchers() - Constructor for class com.atlassian.utt.matchers.OptionalMatchers
 
orderedSubstrings(String...) - Static method in class com.atlassian.utt.matchers.GeneralMatchers
Obtain a Matcher<String> which matches if every one of a given strings appears as a substring of the provided strings and they occur in the same order as they are listed here.

P

proxyAuthChallenge(String) - Static method in class com.atlassian.utt.http.TestHttpServer
Constructs a TestHttpServer.ResponseProperties instance with a 407 (proxy authorization) status and a Proxy-Authenticate header.

R

ReflectionFunctions - Class in com.atlassian.utt.reflect
Factories for functions that call a method of a class, or access a field.
ReflectionFunctions() - Constructor for class com.atlassian.utt.reflect.ReflectionFunctions
 
reject(T) - Static method in class com.atlassian.utt.mock.MoreAnswers
Factory method for explicitly stubbing an individual method as having a strict answer.
requestBody() - Static method in class com.atlassian.utt.http.TestHttpServer.RequestProperties
Use this to construct a Hamcrest matcher for the request body as a String.
requestHasBasicAuth(String) - Static method in class com.atlassian.utt.http.TestHttpServer.RequestProperties
A Hamcrest matcher that asserts that the request had an authorization header using basic authentication.
requestHasNoAuth() - Static method in class com.atlassian.utt.http.TestHttpServer.RequestProperties
A Hamcrest matcher that asserts that the request did not have any authorization header.
requestHasNoProxyAuth() - Static method in class com.atlassian.utt.http.TestHttpServer.RequestProperties
A Hamcrest matcher that asserts that the request did not have any proxy authorization header.
requestHasProxyAuth() - Static method in class com.atlassian.utt.http.TestHttpServer.RequestProperties
A Hamcrest matcher that asserts that the request had a proxy authorization header.
requestHasProxyBasicAuth(String) - Static method in class com.atlassian.utt.http.TestHttpServer.RequestProperties
A Hamcrest matcher that asserts that the request had a proxy authorization header using basic authentication.
requestHasProxyDigestAuth() - Static method in class com.atlassian.utt.http.TestHttpServer.RequestProperties
A Hamcrest matcher that asserts that the request had a proxy authorization header using digest authentication.
requests() - Static method in class com.atlassian.utt.http.TestHttpServer
Use this to construct a Hamcrest matcher for the list of all requests that the test server has received.
reset() - Method in class com.atlassian.utt.http.TestHttpServer
Clears the lists of expected requests and received requests.
respondIf(Matcher<TestHttpServer.RequestProperties>, TestHttpServer.ResponseProperties) - Method in class com.atlassian.utt.http.TestHttpServer
Configures the embedded server to send a specific response whenever it receives a request that meets certain conditions.
run() - Method in class com.atlassian.utt.concurrency.TestThread
The base implementation of the test thread.
run() - Method in interface com.atlassian.utt.matchers.ExceptionMatchers.ThrowingRunnable
Executes whatever it is that we think might throw an exception.
runTest(TestThread...) - Static method in class com.atlassian.utt.concurrency.TestThread
Concurrently launches a group of test threads and verifies the result, using twice the barrier timeout as the time limit for the test.
runTest(long, TestThread...) - Static method in class com.atlassian.utt.concurrency.TestThread
Concurrently launches a group of test threads and verifies the result, using the given timeout (in milliseconds) to limit how long the test is allowed to take.

S

setPrintUnexpectedRequests(boolean) - Method in class com.atlassian.utt.http.TestHttpServer
Specifies whether unmatched HTTP requests should be logged to the console, in addition to the server's usual behavior of returning a 500 error.
signal() - Method in class com.atlassian.utt.concurrency.Barrier
Signals (drops) this barrier.
start() - Method in class com.atlassian.utt.http.TestHttpServer
Starts the embedded server.
startsWithItems(Iterable<Matcher<? super T>>) - Static method in class com.atlassian.utt.matchers.GeneralMatchers
 
startsWithItems(Matcher<? super T>, Matcher<? super T>) - Static method in class com.atlassian.utt.matchers.GeneralMatchers
 
startsWithItems(Matcher<? super T>...) - Static method in class com.atlassian.utt.matchers.GeneralMatchers
 
status(int) - Static method in class com.atlassian.utt.http.TestHttpServer
Constructs a TestHttpServer.ResponseProperties instance with a specific HTTP status code.
stop() - Method in class com.atlassian.utt.http.TestHttpServer
Stops the embedded server immediately, releasing all HTTP worker threads.
strict() - Static method in class com.atlassian.utt.mock.MoreAnswers
Factory method for a strict Answer<T> that will infer the correct type from the context.
strict(Class<T>) - Static method in class com.atlassian.utt.mock.MoreAnswers
Factory method for a strict Answer<T> that will infer the correct type from the supplied class.
Strict<T> - Class in com.atlassian.utt.mock
Mockito mocks are lenient by default, and this makes them throw an exception for anything that was not expressly stubbed.
Strict() - Constructor for class com.atlassian.utt.mock.Strict
 
strictMock(Class<T>) - Static method in class com.atlassian.utt.mock.MoreAnswers
Factory method for creating a strict mock directly.
Sync - Class in com.atlassian.utt.concurrency
A simple synchronization point for coordinating two or more test threads.
Sync() - Constructor for class com.atlassian.utt.concurrency.Sync
Creates a thread synchronization point to coordinate 2 threads.
Sync(int) - Constructor for class com.atlassian.utt.concurrency.Sync
Creates a thread synchronization point to coordinate the given number of threads.
sync() - Method in class com.atlassian.utt.concurrency.Sync
Synchronizes the threads using Barrier.getDefaultTimeout() as the timeout.
sync(long) - Method in class com.atlassian.utt.concurrency.Sync
Synchronizes the threads using the specified timeout in milliseconds.
sync(long, TimeUnit) - Method in class com.atlassian.utt.concurrency.Sync
Synchronizes the threads using the specified timeout.

T

testAllOf(Matcher<? super T>...) - Static method in class com.atlassian.utt.matchers.GeneralMatchers
Same as Matchers.allOf(Matcher...), but does not short-circuit; all of the matchers will be tested even if the first one fails.
testAllOf(Matcher<T>, Matcher<? super T>) - Static method in class com.atlassian.utt.matchers.GeneralMatchers
Same as Matchers.allOf(Matcher...), but does not short-circuit; all of the matchers will be tested even if the first one fails.
testAllOf(Matcher<T>, Matcher<? super T>, Matcher<? super T>) - Static method in class com.atlassian.utt.matchers.GeneralMatchers
Same as Matchers.allOf(Matcher...), but does not short-circuit; all of the matchers will be tested even if the first one fails.
TestHttpServer - Class in com.atlassian.utt.http
A simple embedded HTTP server test fixture.
TestHttpServer.RequestProperties - Class in com.atlassian.utt.http
TestHttpServer.ResponseProperties - Class in com.atlassian.utt.http
A simple abstraction of an HTTP response, used for configuring the test server.
testOnlyIf(Matcher<? super T>, Matcher<? super T>) - Static method in class com.atlassian.utt.matchers.GeneralMatchers
Applies testMatcher only if preconditionMatcher succeeds; if preconditionMatcher fails, ignores the failure and returns success, skipping testMatcher.
TestThread - Class in com.atlassian.utt.concurrency
A test thread built especially for multi-threaded concurrency testing.
TestThread(String) - Constructor for class com.atlassian.utt.concurrency.TestThread
Creates a new test thread.
that(Matcher<? super U>) - Method in class com.atlassian.utt.matchers.NamedFeature
Obtain a matcher that matches when this feature of the target matches a given matcher.
thatIs(U) - Method in class com.atlassian.utt.matchers.NamedFeature
Obtain a matcher that matches when this feature of the target is equal to a given value.
thrown - Variable in class com.atlassian.utt.concurrency.TestThread
An ExpectedException rule that can be used to declare that the test thread should be expected to terminate abnormally.
toString() - Method in class com.atlassian.utt.http.TestHttpServer.RequestProperties
 
toString() - Method in class com.atlassian.utt.logging.CapturedLogging
 
toString() - Method in class com.atlassian.utt.mock.FlipFlop
 
trySignal() - Method in class com.atlassian.utt.concurrency.Barrier
Attempts to signal this barrier.

U

uri() - Static method in class com.atlassian.utt.http.TestHttpServer.RequestProperties
Use this to construct a Hamcrest matcher for the URI of an expected request.

V

valueToEqualMatcher() - Method in class com.atlassian.utt.matchers.NamedFunction
Provides a function that produces an is(equalTo(value)) matcher derived from the wrapped function, for any given value.
A B C D E F G H I K M N O P R S T U V 
Skip navigation links

Copyright © 2017 Atlassian. All rights reserved.