Ejemplo n.º 1
0
        public void TestInsertContact()
        {
            Employee e = new Employee()
            {

                EmployeeID = 1,
                Firstname = "Noma",
                Lastname = "Mhlophe",
                PersonnelNum = 3335,
                JobTitle = "IS Operations Manager",
                Position = "Finance Services Manager",
                ExitDate = null,
                HireDate = null,


            };

            using (EmployeeDAOImpl daoImpl = new EmployeeDAOImpl())
            {
                bool isPer = daoImpl.Persist(e);

                Assert.IsTrue(isPer);

            }

            Contact c = new Contact()
            {
                ContactID = 1,
                EmployeeID = e.EmployeeID,
                CellNumber = "0768923715",
                TellphoneNumber = "0219399999",
                Email = "*****@*****.**"

            };

            using (ContactDAOImpl daoImpl = new ContactDAOImpl())
            {
                bool isPer = daoImpl.Persist(c);

                Assert.IsTrue(isPer);

            }
        }
Ejemplo n.º 2
0
        public void TestPersistContact()
        {
            
            
                Contact c = new Contact()
                {
                    ContactID = 5,
                    CellNumber = "0768992895",
                    TellphoneNumber = "0219399999",
                    Email = "*****@*****.**"

                };
               using (ContactDAOImpl daoImpl = new ContactDAOImpl()){

                    bool isPer = daoImpl.Persist(c);

                    Assert.IsTrue(isPer);
               }
                
            }