MyServiceBusDocs

Testing

Fast feedback without a running broker.

The in-memory test harness uses the same lifecycle and observation model in both clients, so application tests can exercise messaging behavior in isolation.

A minimal harness test

C#
Loading code…

What the harness guarantees

  • Explicit start and stop lifecycle
  • Handler and consumer registration before delivery begins
  • Per-delivery dependency-injection scopes for configured consumers
  • Deterministic consumed observations with explicit timeouts
  • Aligned behavior across C# and Java
Harness vs mediator

The test harness models a hosted transport lifecycle. The standalone in-memory mediator is immediately usable after construction and is intended for in-process messaging.

Integration and interoperability tests

For transport-level confidence, the project uses Testcontainers with dynamically mapped ports and a pinned RabbitMQ image. Cross-language and MassTransit scenarios run in a dedicated opt-in matrix.

NextSee what compatibility means
Interoperability →