public void End_AssesmentDoneStatusRemains_StatusDoesNotChange() { Assesment a = new Assesment(DEFAULT_ID); if (a.GetInfo().Status == AssesmentStatus.Done) { a.End(); Assert.AreEqual(AssesmentStatus.Done, a.GetInfo().Status); } else { Assert.IsTrue(true); } }
public void GetByID_AssesmentNotFound_ObjectIsNull() { Assesment a = new Assesment(0); AssesmentTO to = a.GetInfo(); Assert.AreEqual(null, to); }
public void GetByID_AssesmentFound_IdIsValid() { Assesment a = new Assesment(DEFAULT_ID); AssesmentTO to = a.GetInfo(); Assert.AreEqual(true, !String.IsNullOrEmpty(to.Evaluation.Name)); }
public void GetByAssesmentID_AssesmentFound_EvaluationHasName() { Assesment a = new Assesment(DEFAULT_ASSESMENT_ID); AssesmentTO to = a.GetInfo(); Assert.AreEqual(true, !String.IsNullOrEmpty(to.Evaluation.Name)); }
public void GetByAssesmentID_AssesmentFound_DefaultIdIsRight() { Assesment a = new Assesment(DEFAULT_ASSESMENT_ID); AssesmentTO to = a.GetInfo(); Assert.AreEqual(1, to.ID); }
public void GetByAssesmentID_AssesmentDoesNotExist_ElementIsNull() { Assesment a = new Assesment("xxx"); AssesmentTO to = a.GetInfo(); Assert.IsNull(to); }
public void GetByAssesmentID_AssesmentFound_ElementIsNotNull() { Assesment a = new Assesment(DEFAULT_ASSESMENT_ID); AssesmentTO to = a.GetInfo(); Assert.IsNotNull(to); }
public ActionResult GetData() { Assesment assesment = Session[SESSION_ASSESMENT_OBJECT] != null ? (Assesment)Session[SESSION_ASSESMENT_OBJECT] : null; if (assesment == null) { return(Json(new { }, JsonRequestBehavior.AllowGet)); } return(Json(assesment.GetInfo(), JsonRequestBehavior.AllowGet)); }
public ActionResult CheckAndRoute() { Assesment assesment = Session[SESSION_ASSESMENT_OBJECT] != null ? (Assesment)Session[SESSION_ASSESMENT_OBJECT] : null; if (assesment != null) { if (assesment.GetInfo().Status == AssesmentStatus.Done) { return(View("AlreadyDone")); } else { if (assesment.GetInfo().Status == AssesmentStatus.Started) { return(View("Execution")); } } } return(View()); }
public ActionResult Employee(int id) { if (Session[SessionConstants.Company] == null) { return(View(LoginPage)); } ViewBag.Employee = model.GetEmployee(id, GetSessionCompany().CompanyId); Assesment assesment = model.GetEmployeeAssesment(id, GetSessionCompany().CompanyId); if (assesment != null) { ViewBag.Assesment = assesment.GetInfo(); if (assesment.GetInfo().Status == AssesmentStatus.Done) { ViewBag.AssesmentReport = assesment.GetReport(); } } return(View(GetSessionCompany())); }
public ActionResult GetData() { Assesment assesment = Session[SESSION_ASSESMENT_OBJECT] != null ? (Assesment)Session[SESSION_ASSESMENT_OBJECT] : null; if (assesment == null) { return(Json(new { }, JsonRequestBehavior.AllowGet)); } AssesmentTO obj = assesment.GetInfo(); IEnumerable <SectionDTO> list = from s in obj.Evaluation.Sections select new SectionDTO() { SectionId = s.SectionId, Name = s.Name, Description = s.Description, EstimatedDuration = s.EstimatedDuration, Type = s.Type }; return(Json(new { obj = new { Evaluation = new { Name = obj.Evaluation.Name, Description = obj.Evaluation.Description }, Company = obj.Company }, Sections = list }, JsonRequestBehavior.AllowGet)); }