public static Cart HasCartInitializedEventWith(
        this Cart cart,
        Guid id,
        Guid clientId)
    {
        var @event = cart.PublishedEvent <CartInitialized>();

        @event.Should().NotBeNull();
        @event.Should().BeOfType <CartInitialized>();
        @event !.CartId.Should().Be(id);
        @event.ClientId.Should().Be(clientId);
        @event.CartStatus.Should().Be(CartStatus.Pending);

        return(cart);
    }
    public void ForTentativeCart_ShouldSucceed()
    {
        // Given
        var cart = CartBuilder
                   .Create()
                   .Initialized()
                   .Build();

        // When
        cart.Confirm();

        // Then
        cart.Status.Should().Be(CartStatus.Confirmed);
        cart.Version.Should().Be(2);

        var @event = cart.PublishedEvent <CartConfirmed>();

        @event.Should().NotBeNull();
        @event.Should().BeOfType <CartConfirmed>();
        @event !.CartId.Should().Be(cart.Id);
    }