expect

fun expect(    tracerClass: KClass<*>,     event: KFunction<Unit>,     args: List<Any?>)

Whitelist a trace event error with a tracerClass reference and trace event function references and args.

This overload is preferred when both the tracerClass and event are public and the event reference is not ambiguous as this variant is refactor safe.

A test will not fail because of this error when whitelisted.

Example usages:

TraceEventErrorsListener.expect(
DebugConnectionService::class,
DebugConnectionService.DebugConnectionEvents::onStateChange,
listOf(PHONE_NUMBER.toPhoneUri().uri, CallState.ACTIVE)
)

TraceEventErrorsListener.expect(
DebugConnectionService::class,
DebugConnectionService.DebugConnectionEvents::onStateChange,
listOf("tel:.*".toRegex(), CallState.DIALING)
)

fun expect(    tracerClass: KClass<*>,     eventName: String,     args: List<Any?>)

Whitelist a trace event error with a tracerClass reference, eventName and args.

This overload can be used when tracerClass is public and the trace event function is not public or the event function references is ambiguous.

A test will not fail because of this error when whitelisted.

Example usages:

TraceEventErrorsListener.expect(
DebugConnectionService::class,
DebugConnectionService.DebugConnectionEvents::onStateChange,
listOf(PHONE_NUMBER.toPhoneUri().uri, CallState.ACTIVE)
)

TraceEventErrorsListener.expect(
DebugConnectionService::class,
DebugConnectionService.DebugConnectionEvents::onStateChange,
listOf("tel:.*".toRegex(), CallState.DIALING)
)

fun expect(    tracerClassName: String,     event: KFunction<Unit>,     args: List<Any?>)

Whitelist a trace event error with a tracerClassName, trace event function references and args.

This overload can be used when the tracer class is not public and the trace event function is public and the event function references is not ambiguous.

A test will not fail because of this error when whitelisted.

Example usages:

TraceEventErrorsListener.expect(
"DebugConnectionService",
DebugConnectionService.DebugConnectionEvents::onStateChange,
listOf(PHONE_NUMBER.toPhoneUri().uri, CallState.ACTIVE)
)

TraceEventErrorsListener.expect(
"DebugConnectionService",
DebugConnectionService.DebugConnectionEvents::onStateChange,
listOf("tel:.*".toRegex(), CallState.DIALING)
)

fun expect(    tracerClassName: String,     eventName: String,     args: List<Any?>)

Whitelist a trace event error with a tracerClassName, eventName and args.

This overload can be used when the tracer class is not public and the trace event function is not public or the trace event function reference is ambiguous.

A test will not fail because of this error when whitelisted.

Example usages:

TraceEventErrorsListener.expect(
"DebugConnectionService",
"onStateChange",
listOf(PHONE_NUMBER.toPhoneUri().uri, CallState.ACTIVE)
)

TraceEventErrorsListener.expect(
"DebugConnectionService",
"onStateChange",
listOf("tel:.*".toRegex(), CallState.DIALING)
)