Ejemplo n.º 1
0
        public virtual void Should_go_to_staff_Custom_Metrics_Based_Watch_List()
        {
            //"~/Districts/DistrictName/Schools/School-Name/Staff/StaffFirst-LastName-1234/MetricsBasedWatchList"
            var request = new MetricsBasedWatchListGetRequest
            {
                Id = 1
            };

            General.MetricsBasedWatchList("MetricsBasedWatchList", 1).ToVirtual()
                .ShouldMapTo<MetricsBasedWatchListController>(c => c.Get(request));
        }
        public ActionResult Get(MetricsBasedWatchListGetRequest request)
        {
            if (Request.QueryString != null && Request.QueryString.Count >= 3)
            {
                request.Id = int.Parse(Request.QueryString["Id"]);
                request.StaffUSI = long.Parse(Request.QueryString["StaffUSI"]);
                request.SchoolId = int.Parse(Request.QueryString["SchoolId"]);
            }
            
            var model = MetricsBasedWatchListService.Get(request);

            return Json(model, JsonRequestBehavior.AllowGet);
        }