- java.lang.Object
-
- de.carne.test.swt.tester.DialogMock<T>
-
- Type Parameters:
T- the actual dialog result type.
public abstract class DialogMock<T> extends java.lang.ObjectBase class for mocking of standard dialog results during a test run.
-
-
Constructor Summary
Constructors Constructor Description DialogMock()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidofferResult(@Nullable java.util.function.Supplier<T> resultSupplier)Adds a result to the result queue.voidofferResult(@Nullable T result)Adds a result to the result queue.protected @Nullable java.util.function.Supplier<T>pollResult()Gets the next result from the result queue.
-
-
-
Method Detail
-
offerResult
public void offerResult(@Nullable T result)
Adds a result to the result queue.- Parameters:
result- the result to add.
-
offerResult
public void offerResult(@Nullable java.util.function.Supplier<T> resultSupplier)
Adds a result to the result queue.- Parameters:
resultSupplier- the result to add.
-
pollResult
protected @Nullable java.util.function.Supplier<T> pollResult()
Gets the next result from the result queue.- Returns:
- the next result from the result queue or
nullif the result queue is empty.
-
-