T
- generic type of the from side of the transformation being
testedR
- generic type of the to side of the transformation being testedpublic static class TestingHelper.Builder<T,R> extends Object
Modifier and Type | Method and Description |
---|---|
TestingHelper.Builder<T,R> |
function(rx.functions.Func1<rx.Observable<T>,rx.Observable<R>> function)
Sets transformation to be tested and returns the current builder.
|
TestingHelper.CaseBuilder<T,R> |
name(String name)
Sets the name of the test which is used in the name of a junit test.
|
junit.framework.TestSuite |
testSuite(Class<?> cls)
Returns the JUnit
TestSuite comprised of the test cases
created so far. |
TestingHelper.Builder<T,R> |
waitForMoreTerminalEvents(long duration,
TimeUnit unit)
Sets duration to wait for more terminal events after one has been
received.
|
TestingHelper.Builder<T,R> |
waitForTerminalEvent(long duration,
TimeUnit unit)
Sets duration to wait for a terminal event (completed or error) when
one is expected.
|
TestingHelper.Builder<T,R> |
waitForUnsubscribe(long duration,
TimeUnit unit)
Sets duration to wait for unusubscription to occur (either of source
or of downstream subscriber).
|
public TestingHelper.Builder<T,R> function(rx.functions.Func1<rx.Observable<T>,rx.Observable<R>> function)
function
- transformation to be testedpublic TestingHelper.Builder<T,R> waitForUnsubscribe(long duration, TimeUnit unit)
duration
- number of time unitsunit
- time unitpublic TestingHelper.Builder<T,R> waitForTerminalEvent(long duration, TimeUnit unit)
duration
- number of time unitsunit
- time unitpublic TestingHelper.Builder<T,R> waitForMoreTerminalEvents(long duration, TimeUnit unit)
duration
- number of time unitsunit
- time unitpublic TestingHelper.CaseBuilder<T,R> name(String name)
name
- name of the testpublic junit.framework.TestSuite testSuite(Class<?> cls)
TestSuite
comprised of the test cases
created so far. The cases will be listed under the root test named
according to the given class.cls
- class corresponding to the tests rootCopyright © 2013–2016. All rights reserved.