public async Task with_snapshot_but_without_stream_should_throw_stale_aggregate_exception() { var ticketState = new TicketState(); var snapshot = new SnapshotInfo("Ticket_1", 2, ticketState, "1"); await Snapshots.AddAsync("Ticket_1", snapshot).ConfigureAwait(false); var ex = await Assert.ThrowsAsync <StaleSnapshotException>(() => Repository.GetByIdAsync <Ticket>("Ticket_1") ).ConfigureAwait(false); Assert.Equal("Ticket_1", ex.AggregateId); Assert.Equal(2, ex.AggregateVersion); }