public class TestContext extends Object
| Constructor and Description |
|---|
TestContext()
Constructs my default state.
|
TestContext(int times)
Constructs my default state with
times. |
| Modifier and Type | Method and Description |
|---|---|
AccessSafely |
access()
Answer my access;
|
<T> TestContext |
initialReferenceValueOf(T value)
Answer myself after initializing my atomic reference to
value. |
<T> T |
mustComplete()
Answer the
T typed value of my access when it is available. |
<T> T |
referenceValue()
Answer my reference values as a
T. |
<T> TestContext |
referenceValueTo(T value)
Answer the
TestContext after writing the value at "reference". |
TestContext |
resetAfterCompletingTo(int times)
Answer a myself with with a new expected completions/happenings
times. |
public TestContext()
public TestContext(int times)
times.times - the int number of times to completepublic AccessSafely access()
public <T> T mustComplete()
T typed value of my access when it is available.
Block unless the value is immediately available.T - the type of my reference to answerpublic <T> TestContext initialReferenceValueOf(T value)
value.T - the type of value to setvalue - the T valuepublic <T> T referenceValue()
T.T - the value typepublic <T> TestContext referenceValueTo(T value)
TestContext after writing the value at "reference".T - type value typevalue - the T typed value to writepublic TestContext resetAfterCompletingTo(int times)
times.times - the number of expected completionsCopyright © 2021. All rights reserved.