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); }
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"); }
public EmployeeController() { _db = new ManagerEmpContext(); }
public EmployeeController(ManagerEmpContext db) { _db = db; }
public ManagerController() { _db = new ManagerEmpContext(); }
public ManagerController(ManagerEmpContext db) { _db = db; }