Exemplo n.º 1
0
        // GET: DoctorActivity
        public ActionResult DoctorActivity(string name)
        {
            var doctoryActivity = reportBLL.DoctorActivity(name);

            ViewBag.Name = name;
            ViewBag.Sum  = doctoryActivity.Sum(c => c.Value);

            if (doctoryActivity == null)
            {
                return(HttpNotFound());
            }

            return(View(doctoryActivity));
        }
Exemplo n.º 2
0
        public void ManagerController_DoctorActivity()
        {
            //Arrange
            var mc        = new ManagerController();
            var reportBLL = new ReportBLL();

            //Act
            var result              = mc.DoctorActivity("*****@*****.**") as ViewResult;
            var doctorconducted_pc  = (List <MedicationTypeViewData>)result.ViewData.Model;
            var doctorconducted_pcs = reportBLL.DoctorActivity("*****@*****.**");

            //Asert
            Assert.AreEqual("*****@*****.**", result.ViewBag.Name);
            Assert.AreEqual(doctorconducted_pcs.Count, doctorconducted_pc.Count);
        }