Пример #1
0
        public void TestMethod6()
        {
            Mock <checkEmployee> chk = new Mock <checkEmployee>();

            chk.Setup(x => x.checkEmp()).Returns(true);

            processEmployee proc = new processEmployee();

            Assert.AreEqual(proc.insertEmployee(chk.Object), true);
        }
Пример #2
0
        public void TestMethod1()
        {
            Mock <checkEmploye> chk = new Mock <checkEmploye>();

            //We need to use a lambda expression to point to a specific function.
            chk.Setup(x => x.checkEmp()).Returns(true);

            processEmployee obje = new processEmployee();

            Assert.AreEqual(obje.insertEmployee(chk.Object), true);
            Debug.WriteLine("executé le : " + DateTime.Now.TimeOfDay.ToString());
        }