Ejemplo n.º 1
0
        public void GetAllAcademicPlansTest()
        {
            AcademicPlanRepository rep   = new AcademicPlanRepository();
            List <AcademicPlan>    plans = rep.Read();

            Assert.IsNotNull(plans);
        }
Ejemplo n.º 2
0
        public void GetPlanTest()
        {
            AcademicPlanRepository repo  = new AcademicPlanRepository();
            List <AcademicPlan>    plans = repo.GetPlan(2);

            Assert.IsNotNull(plans);
        }
Ejemplo n.º 3
0
        public void GetAcademPlanById()
        {
            AcademicPlanRepository academicPlan = new AcademicPlanRepository();
            AcademicPlan           plan         = academicPlan.Read(12);

            Assert.IsNotNull(plan);
        }
Ejemplo n.º 4
0
        public void UpdateAcademPlanTest()
        {
            AcademicPlanRepository rep  = new AcademicPlanRepository();
            AcademicPlan           plan = rep.Read(22);

            plan.SpecialityId = 2;
            rep.Update(plan);
            Assert.AreEqual(2, plan.SpecialityId);
        }
Ejemplo n.º 5
0
        public void DeleteAcademPlanTest()
        {
            AcademicPlanRepository rep = new AcademicPlanRepository();

            rep.Delete(26);
            AcademicPlan plan = rep.Read(26);

            Assert.IsNull(plan);
        }
Ejemplo n.º 6
0
 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));
        }