public async void GetAllVideos_Called_ReturnsOkWithListOfVideos() { IUnitOfWork unitOfWork = Substitute.For <IUnitOfWork>(); IVideoManager videoManager = Substitute.For <IVideoManager>(); ICookieManager cookieManager = Substitute.For <ICookieManager>(); var testList = new List <Video>() { new Video(), new Video(), new Video(), new Video() }; unitOfWork.Videos.GetAll().Returns(testList); var videosController = new VideosController(unitOfWork, videoManager, cookieManager); var result = await videosController.GetAllVideos(); var okObjectResult = Assert.IsType <OkObjectResult>(result); var returnValue = Assert.IsType <List <Video> >(okObjectResult.Value); Assert.Equal(testList.Count, returnValue.Count); }