Class RecordedMessageBusAssertions
- Namespace
- XBullet.EasyTesting.Messaging
- Assembly
- XBullet.EasyTesting.Messaging.dll
Fluently verifies messages captured by a recording bus.
public sealed class RecordedMessageBusAssertions
- Inheritance
-
RecordedMessageBusAssertions
- Inherited Members
Methods
ContainSingle(string, string)
Requires exactly one message for the supplied transport and destination.
public RecordedMessageAssertions ContainSingle(string transport, string destination)
Parameters
transportstringThe non-empty transport identifier matched without regard to case.
destinationstringThe non-empty destination matched using ordinal, case-sensitive comparison.
Returns
- RecordedMessageAssertions
A new assertion object bound to the single matching message and the bus's serializer options.
Exceptions
- RecordedMessageVerificationException
The point-in-time message snapshot contains zero or multiple matches.
HaveCount(int)
Requires exactly the supplied number of recorded messages.
public RecordedMessageBusAssertions HaveCount(int expected)
Parameters
expectedintThe non-negative message count required at assertion time.
Returns
- RecordedMessageBusAssertions
This bus assertion object so additional checks can be chained.
Exceptions
- RecordedMessageVerificationException
The current message count does not equal
expected.