Esempio n. 1
0
        public void AddPurchase()
        {
            if (productService.GetAllProducts().Count > 0 && clientService.GetAllClients().Count > 0)
            {
                int clientId  = clientService.GetLastlyAddedClient()._id;
                int productId = productService.GetLastlyAddedProduct()._id;

                PurchaseEvent e = new PurchaseEvent()
                {
                    ClientId  = clientId,
                    ProductId = productId,
                    EventDate = DateTime.Now.ToLongDateString()
                };

                Assert.IsTrue(purchaseService.AddPurchaseEvent(e));
            }
        }