示例#1
0
        public void ViewAddEmployee()
        {
            var _dbManager = new ManagerEmpContext();
            var mgr        = _dbManager.Manager.Where(m => m.last_name == "Doe").SingleOrDefault();
            var controller = new EmployeeController();
            var result     = controller.AddEmployee(mgr.mgr_id);

            Assert.IsAssignableFrom(typeof(ViewResult), result);
        }
示例#2
0
        public void ViewManagerDetails()
        {
            var mgr_db     = new ManagerEmpContext();
            var mgr        = mgr_db.Manager.Where(m => m.last_name == "Doe").First();
            var controller = new ManagerController();
            var result     = controller.Details(mgr.mgr_id);

            Assert.IsNotNull(result);
            Assert.That(mgr.first_name == "Janet");
        }
示例#3
0
 public EmployeeController()
 {
     _db = new ManagerEmpContext();
 }
示例#4
0
 public EmployeeController(ManagerEmpContext db)
 {
     _db = db;
 }
示例#5
0
 public ManagerController()
 {
     _db = new ManagerEmpContext();
 }
示例#6
0
 public ManagerController(ManagerEmpContext db)
 {
     _db = db;
 }