Beispiel #1
0
        public void GetCompletedRequestTest()
        {
            var response      = dashboardController.GetCompletedRequests(1);
            var contentResult = response as JsonResult <DashboardViewModel>;


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

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


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