public void GetAllAcademicPlansTest() { AcademicPlanRepository rep = new AcademicPlanRepository(); List <AcademicPlan> plans = rep.Read(); Assert.IsNotNull(plans); }
public void GetPlanTest() { AcademicPlanRepository repo = new AcademicPlanRepository(); List <AcademicPlan> plans = repo.GetPlan(2); Assert.IsNotNull(plans); }
public void GetAcademPlanById() { AcademicPlanRepository academicPlan = new AcademicPlanRepository(); AcademicPlan plan = academicPlan.Read(12); Assert.IsNotNull(plan); }
public void UpdateAcademPlanTest() { AcademicPlanRepository rep = new AcademicPlanRepository(); AcademicPlan plan = rep.Read(22); plan.SpecialityId = 2; rep.Update(plan); Assert.AreEqual(2, plan.SpecialityId); }
public void DeleteAcademPlanTest() { AcademicPlanRepository rep = new AcademicPlanRepository(); rep.Delete(26); AcademicPlan plan = rep.Read(26); Assert.IsNull(plan); }
public void AddAcademicPlanTest() { AcademicPlanRepository rep = new AcademicPlanRepository(); AcademicPlan plan = new AcademicPlan() { SemestreId = 1, SpecialityId = 3, SubjectId = 1 }; }
/// <summary> /// Gets Academic Plan by Id /// </summary> /// <param name="id"></param> /// <returns></returns> public async Task <ActionResult> Plan(int id) { AcademicPlanRepository rep = new AcademicPlanRepository(); var plan = rep.GetPlan(id); if (plan == null) { return(HttpNotFound()); } return(View(plan)); }