Esempio n. 1
0
        public void GetApprovedRequestTest()
        {
            var response      = dashboardController.GetApprovedRequests(1);
            var contentResult = response as JsonResult <DashboardViewModel>;


            Assert.AreEqual(10, contentResult.Content.ItemsPerPage);
            Assert.AreEqual(1, contentResult.Content.TotalRequestsCount);
            Assert.AreEqual(1, contentResult.Content.RequestsList.Count);

            response      = dashboardController.GetApprovedRequests(2);
            contentResult = response as JsonResult <DashboardViewModel>;


            Assert.AreEqual(10, contentResult.Content.ItemsPerPage);
            Assert.AreEqual(1, contentResult.Content.TotalRequestsCount);
            Assert.AreEqual(0, contentResult.Content.RequestsList.Count);
        }