Class NotifyBuilder

Assembly: redb.Route.TestKit.dll

Builds a that waits for route events instead of a mock at the end of
the route (Apache Camel NotifyBuilder): "route orders has processed 3 exchanges
without failure" is ctx.Notify().FromRoute("orders").WhenDone(3).Create().

Scope (, , ) narrows which exchanges
are counted; the When* conditions are cumulative — the matcher matches when all of them hold.

public sealed class NotifyBuilder

Inheritance

Object→NotifyBuilder

Methods

Create()

Registers the matcher as a lifecycle listener on the context and starts counting.

public NotifyMatcher Create()

Filter(Func<IExchange, bool>)

Counts only exchanges for which predicate holds.

public NotifyBuilder Filter(Func<IExchange, bool> predicate)

Filter(IPredicate)

Counts only exchanges for which predicate holds (awaited).

public NotifyBuilder Filter(IPredicate predicate)

Filter(string)

Counts only exchanges for which the route-language condition holds (same compiler as Filter(string) in routes).

public NotifyBuilder Filter(string condition)

From(string)

Counts only exchanges of routes whose From URI matches the mask (kafka://*, regex:...).

public NotifyBuilder From(string uriMask)

FromRoute(string)

Counts only exchanges of the route with this id (repeatable).

public NotifyBuilder FromRoute(string routeId)

WhenCompleted(int)

Matches once at least count exchanges completed without a propagated exception.

public NotifyBuilder WhenCompleted(int count)

WhenDone(int)

Matches once at least count exchanges finished, completed or failed.

public NotifyBuilder WhenDone(int count)

WhenFailed(int)

Matches once at least count exchanges escaped their route with an exception.

public NotifyBuilder WhenFailed(int count)

WhenReceived(int)

Matches once at least count exchanges have entered the scoped routes.

public NotifyBuilder WhenReceived(int count)