public void OnGet_IfValidModel_ReturnPage()
        {
            var pageModel = new TrafficDensityModel();
            var result    = pageModel.OnGet();

            Assert.IsType <PageResult>(result);
        }
        public void OnPostSearchList_IfValidModel_ReturnPage()
        {
            var    pageModel  = new TrafficDensityModel();
            string testString = "test";
            var    result     = pageModel.OnPostSearchList(testString);

            Assert.IsType <PageResult>(result);
        }
        public void OnGet_IfInvalidModel_ReturnBadRequest()
        {
            var pageModel = new TrafficDensityModel();

            pageModel.ModelState.AddModelError("Error", "Bad request: GET method failed in TrafficDensity.cshtml.cs.");
            var result = pageModel.OnGet();

            Assert.IsType <BadRequestResult>(result);
        }
        public void OnPostSearchList_IfInvalidModel_ReturnBadRequest()
        {
            var pageModel = new TrafficDensityModel();

            pageModel.ModelState.AddModelError("Error", "Bad request: OnPostSearchList method failed in TrafficDensity.cshtml.cs.");
            string testString = "test";
            var    result     = pageModel.OnPostSearchList(testString);

            Assert.IsType <BadRequestResult>(result);
        }