Table of Contents

Class MessageCollection

Namespace
Ratatoskr.Testing
Assembly
Ratatoskr.Testing.dll

A queryable collection of tracked messages with assertion helpers.

public class MessageCollection : IEnumerable<TrackedMessage>, IEnumerable
Inheritance
MessageCollection
Implements
Inherited Members

Properties

Count

Gets the number of tracked messages in this collection.

Methods

All<T>()

Gets all messages of the specified type.

First<T>()

Gets the first message of the specified type. Throws if none found.

GetEnumerator()

Returns an enumerator that iterates through the collection.

ShouldHaveMessage<T>()

Asserts that at least one message of the specified type exists. Returns the first match.

ShouldHaveNoMessage<T>()

Asserts that no messages of the specified type exist.

Single<T>()

Gets a single message of the specified type. Throws if zero or more than one match.