private Order InsertOrder()
 {
     Customer customer = new Customer { ID = "VINET" };
     Employee employee = new Employee { ID = 4 };
     DateTime dt = DateTime.Now;
     Order order = new Order
     {
         Customer = customer,
         Employee = employee,
         OrderDate = dt,
         RequiredDate = dt.AddDays(20),
         ShippedDate = dt.AddDays(10),
         ShipVia = 2,
         Freight = (decimal)10.2,
         ShipName = "KadeteShip",
         ShipAddress = "PevidesAdress",
         ShipCity = "Kadete Town",
         ShipRegion = "RL",
         ShipPostalCode = "2640",
         ShipCountry = "Portugal"
     };
     _orderDataMapper.Insert(order);
     Assert.IsNotNull(order.ID);
     Assert.AreNotEqual(0, order.ID);
     Assert.AreEqual(4, order.Employee.ID);
     Assert.AreEqual("VINET", order.Customer.ID);
     return order;
 }
 private void DeleteEmployee(Employee Employee)
 {
     _employeeDataMapper.Delete(Employee);
 }
        private Employee InsertEmployee()
        {
            Employee boss = new Employee { ID = 6 };

            Employee Employee = new Employee
            {
                FirstName = "Flávio",
                LastName = "Cadete",
                Address = "Mafra",
                BirthDate = new DateTime(1990, 09,05),
                City = "Lisbon",
                Country = "Portugal",
                Title = "Manage",
                ReportsTo = boss
            };
            _employeeDataMapper.Insert(Employee);

            Assert.IsNotNull(Employee.ID);
            Assert.AreNotEqual(0, Employee.ID);
            return Employee;
        }
        public void UpdateEmployee(Employee Employee)
        {
            Employee.LastName = "El Boss";

            _employeeDataMapper.Update(Employee);
            //TODO _EmployeeDataMapper.getById()
            IEnumerator<Employee> enumerator = _employeeDataMapper.GetAll().Where("EmployeeID =" + Employee.ID).GetEnumerator();
            Assert.IsTrue(enumerator.MoveNext());
            Employee emp = enumerator.Current;
            Assert.AreEqual("El Boss", emp.LastName);
            Assert.AreEqual(6, emp.ReportsTo.ID);
            while (enumerator.MoveNext()) { }
        }