akka.testkit
Class JavaTestKit.EventFilter<T>
java.lang.Object
akka.testkit.JavaTestKit.EventFilter<T>
- Enclosing class:
- JavaTestKit
public abstract class JavaTestKit.EventFilter<T>
- extends java.lang.Object
Facilities for selectively filtering out expected events from logging so
that you can keep your test run’s console output clean and do not miss real
error messages.
If the occurrences
is set to Integer.MAX_VALUE
,
no tracking is done.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JavaTestKit.EventFilter
public JavaTestKit.EventFilter(java.lang.Class<?> clazz)
run
protected abstract T run()
exec
public T exec()
message
public JavaTestKit.EventFilter<T> message(java.lang.String msg)
startsWith
public JavaTestKit.EventFilter<T> startsWith(java.lang.String msg)
matches
public JavaTestKit.EventFilter<T> matches(java.lang.String regex)
from
public JavaTestKit.EventFilter<T> from(java.lang.String source)
occurrences
public JavaTestKit.EventFilter<T> occurrences(int number)