Exemplo n.º 1
0
        public async Task <Cart> CreateAsync()
        {
            var cart = Cart.CreateEmptyFor(new User(UserId.New()));
            await cartRepository.SaveAsync(cart);

            return(cart);
        }
Exemplo n.º 2
0
 public void Setup()
 {
     DeleteTables("carts", "cart_items");
     user = new User(UserId.New());
     domainEventPubSub = new DomainEventPubSub();
     cartRepository    = new SqlCartRepository(ConnectionString, domainEventPubSub);
     orderRepository   = new SqlOrderRepository(ConnectionString, domainEventPubSub);
     productsReadModel = new InMemoryProductsReadModel(domainEventPubSub);
     orderReadModel    = new InMemoryOrderReadModel();
 }
Exemplo n.º 3
0
 public void Setup()
 {
     user = new User(UserId.New());
 }