public class TextMethodTester<T> extends Object implements YamlTester
| Modifier and Type | Class and Description |
|---|---|
static interface |
TextMethodTester.PostSetup |
| Modifier and Type | Field and Description |
|---|---|
static Consumer<net.openhft.chronicle.core.util.InvocationTargetRuntimeException> |
DEFAULT_INVOCATION_TARGET_RUNTIME_EXCEPTION_CONSUMER |
static boolean |
SINGLE_THREADED_CHECK_DISABLED |
BASE_TESTS, REGRESS_TESTS| Constructor and Description |
|---|
TextMethodTester(String input,
BiFunction<T,net.openhft.chronicle.bytes.UpdateInterceptor,Object> componentFunction,
Class<T> outputClass,
String output) |
TextMethodTester(String input,
Function<T,Object> componentFunction,
Class<T> outputClass,
String output) |
TextMethodTester(String input,
Function<T,Object> componentFunction,
Function<WireOut,T> outputFunction,
String output) |
| Modifier and Type | Method and Description |
|---|---|
String |
actual() |
TextMethodTester<T> |
addOutputClass(Class outputClass) |
Function<String,String> |
afterRun() |
@NotNull TextMethodTester<T> |
afterRun(Function<String,String> afterRun) |
Map<String,String> |
agitate(YamlAgitator agitator)
Using this test as a template, generate more tests using this YamlAgitator
|
protected Wire |
createWire(byte[] byteArray) |
protected Wire |
createWire(net.openhft.chronicle.bytes.Bytes<?> bytes) |
TextMethodTester<T> |
exceptionHandlerFunction(Function<T,net.openhft.chronicle.core.onoes.ExceptionHandler> exceptionHandlerFunction) |
TextMethodTester<T> |
exceptionHandlerFunctionAndLog(boolean exceptionHandlerFunctionAndLog) |
BiConsumer<net.openhft.chronicle.bytes.MethodReader,T> |
exceptionHandlerSetup() |
TextMethodTester<T> |
exceptionHandlerSetup(BiConsumer<net.openhft.chronicle.bytes.MethodReader,T> exceptionHandlerSetup) |
String |
expected() |
String |
genericEvent() |
TextMethodTester<T> |
genericEvent(String genericEvent) |
TextMethodTester<T> |
inputFunction(Function<String,String> inputFunction) |
protected @NotNull StringBuilder |
loadLastValues() |
TextMethodTester<T> |
methodReaderInterceptorReturns(net.openhft.chronicle.bytes.MethodReaderInterceptorReturns methodReaderInterceptorReturns) |
Consumer<net.openhft.chronicle.core.util.InvocationTargetRuntimeException> |
onInvocationException() |
TextMethodTester<T> |
onInvocationException(Consumer<net.openhft.chronicle.core.util.InvocationTargetRuntimeException> onInvocationException) |
boolean |
readOne(net.openhft.chronicle.bytes.MethodReader reader0,
net.openhft.chronicle.core.onoes.ExceptionHandler exceptionHandler) |
static boolean |
resourceExists(String resourceName) |
String[] |
retainLast() |
@NotNull TextMethodTester<T> |
retainLast(String... retainLast) |
@NotNull TextMethodTester<T> |
run() |
String |
setup() |
@NotNull TextMethodTester<T> |
setup(@Nullable String setup) |
@NotNull TextMethodTester<T> |
setups(@NotNull List<String> setups) |
TextMethodTester<T> |
testFilter(Predicate<String> testFilter) |
TextMethodTester<T> |
timeoutMS(long timeoutMS) |
TextMethodTester<T> |
updateInterceptor(net.openhft.chronicle.bytes.UpdateInterceptor updateInterceptor) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitrunTest, runTest, runTestpublic static final boolean SINGLE_THREADED_CHECK_DISABLED
public static final Consumer<net.openhft.chronicle.core.util.InvocationTargetRuntimeException> DEFAULT_INVOCATION_TARGET_RUNTIME_EXCEPTION_CONSUMER
public TextMethodTester(String input, Function<T,Object> componentFunction, Class<T> outputClass, String output)
public TextMethodTester(String input, BiFunction<T,net.openhft.chronicle.bytes.UpdateInterceptor,Object> componentFunction, Class<T> outputClass, String output)
public TextMethodTester<T> addOutputClass(Class outputClass)
public static boolean resourceExists(String resourceName)
public String[] retainLast()
@NotNull public @NotNull TextMethodTester<T> retainLast(String... retainLast)
public String setup()
@NotNull public @NotNull TextMethodTester<T> setup(@Nullable @Nullable String setup)
@NotNull public @NotNull TextMethodTester<T> setups(@NotNull @NotNull List<String> setups)
@NotNull public @NotNull TextMethodTester<T> afterRun(Function<String,String> afterRun)
public BiConsumer<net.openhft.chronicle.bytes.MethodReader,T> exceptionHandlerSetup()
public TextMethodTester<T> exceptionHandlerSetup(BiConsumer<net.openhft.chronicle.bytes.MethodReader,T> exceptionHandlerSetup)
public String genericEvent()
public TextMethodTester<T> genericEvent(String genericEvent)
public Consumer<net.openhft.chronicle.core.util.InvocationTargetRuntimeException> onInvocationException()
public TextMethodTester<T> onInvocationException(Consumer<net.openhft.chronicle.core.util.InvocationTargetRuntimeException> onInvocationException)
@NotNull public @NotNull TextMethodTester<T> run() throws IOException
IOExceptionpublic Map<String,String> agitate(YamlAgitator agitator) throws net.openhft.chronicle.core.io.IORuntimeException
YamlTesteragitate in interface YamlTesteragitator - to usenet.openhft.chronicle.core.io.IORuntimeException - if an IO error occurspublic boolean readOne(net.openhft.chronicle.bytes.MethodReader reader0,
net.openhft.chronicle.core.onoes.ExceptionHandler exceptionHandler)
protected Wire createWire(byte[] byteArray)
protected Wire createWire(net.openhft.chronicle.bytes.Bytes<?> bytes)
@NotNull protected @NotNull StringBuilder loadLastValues() throws IOException, net.openhft.chronicle.core.io.InvalidMarshallableException
IOExceptionnet.openhft.chronicle.core.io.InvalidMarshallableExceptionpublic String expected()
expected in interface YamlTesterpublic String actual()
actual in interface YamlTesterpublic TextMethodTester<T> updateInterceptor(net.openhft.chronicle.bytes.UpdateInterceptor updateInterceptor)
public TextMethodTester<T> methodReaderInterceptorReturns(net.openhft.chronicle.bytes.MethodReaderInterceptorReturns methodReaderInterceptorReturns)
public TextMethodTester<T> timeoutMS(long timeoutMS)
public TextMethodTester<T> exceptionHandlerFunction(Function<T,net.openhft.chronicle.core.onoes.ExceptionHandler> exceptionHandlerFunction)
public TextMethodTester<T> exceptionHandlerFunctionAndLog(boolean exceptionHandlerFunctionAndLog)
public TextMethodTester<T> testFilter(Predicate<String> testFilter)
public TextMethodTester<T> inputFunction(Function<String,String> inputFunction)
Copyright © 2023. All rights reserved.