public void HTTPGET_GetAllPublishers_WithSortBySearchPageNr_ReturnOk_Test() { IActionResult actionResult = publishersController.GetAllPublishers("name_desc", "Publisher", 1); Assert.That(actionResult, Is.TypeOf <OkObjectResult>()); var actionResultData = (actionResult as OkObjectResult).Value as List <Publisher>; Assert.That(actionResultData.First().Name, Is.EqualTo("Publisher 6")); Assert.That(actionResultData.First().Id, Is.EqualTo(6)); Assert.That(actionResultData.Count, Is.EqualTo(5)); IActionResult actionResultSecondPage = publishersController.GetAllPublishers("name_desc", "Publisher", 2); Assert.That(actionResultSecondPage, Is.TypeOf <OkObjectResult>()); var actionResultDataSecondPage = (actionResultSecondPage as OkObjectResult).Value as List <Publisher>; Assert.That(actionResultDataSecondPage.First().Name, Is.EqualTo("Publisher 1")); Assert.That(actionResultDataSecondPage.First().Id, Is.EqualTo(1)); Assert.That(actionResultDataSecondPage.Count, Is.EqualTo(1)); }