Source/Events/EventStreamAssertion.cs
/// <summary>
/// Asserts that the specified <see cref="IEvent" /> type is not present in the event stream.
/// </summary>
/// <param name="eventSource">The <see cref="AggregateRoot" /> containing the events to assert against.</param>
/// <typeparam name="T"><see cref="Type" /> of the <see cref="IEvent" /> that you wish to assert against.</typeparam>
Asserts that the specified  type is not present in the event stream.
Asserts that the specified type is not present in the event stream .
public static void ShouldNotHaveEvent<T>(this AggregateRoot eventSource)
            where T : IEvent
        {
            var present = eventSource.UncommittedEvents.OfType<T>().Any();
            present.ShouldBeFalse();
        }
public static void ShouldNotHaveEvent < T > ( this AggregateRoot eventSource ) where T : IEvent { var present = eventSource . UncommittedEvents . OfType < T > ( ) . Any ( ) ; present . ShouldBeFalse ( ) ; }
Asserts that the specified  type is not present in the event stream.
Asserts that the specified type is not present in the event stream .
AggregateRoot
this
eventSource
The  containing the events to assert against.
The containing the events to assert against .
typeparam
of the  that you wish to assert against.
of the that you wish to assert against .