Ejemplo n.º 1
0
        public void AddCustomerToDatabaseTest()
        {
            manager.NukeTheData();
            Assert.IsTrue(manager.AddCustomer(1, "Parke"));
            Assert.AreEqual(manager.GetCustomer(1).Name, "Parke");
            Assert.AreEqual(manager.GetCustomer(1).Customer_id, 1);

            Assert.IsTrue(manager.DeleteCustomer(manager.GetCustomer(1).Customer_id));
            manager.NukeTheData();
        }
Ejemplo n.º 2
0
        public void AddEventToDatabaseTest()
        {
            manager.NukeTheData();
            Assert.IsTrue(manager.AddCustomer(1, "Marcin Najman"));
            Assert.IsTrue(manager.AddProduct(1, "Chips"));

            Assert.IsTrue(manager.AddEvent(1, DateTime.Now, manager.GetProductByID(1).ProductID, manager.GetCustomer(1).Customer_id));

            Assert.IsTrue(manager.DeleteEvent(manager.GetEventByID(1).Event_id));
            Assert.IsTrue(manager.DeleteProduct(manager.GetProductByID(1).ProductID));
            Assert.IsTrue(manager.DeleteCustomer(manager.GetCustomer(1).Customer_id));
        }
Ejemplo n.º 3
0
 public bool AddCustomer(int ID, string Name)
 {
     return(manager.AddCustomer(ID, Name));
 }