public async void GetVideosByModuleContentId_CalledWithInvalidId_ReturnsNotFoundWithId()
        {
            IUnitOfWork    unitOfWork    = Substitute.For <IUnitOfWork>();
            IVideoManager  videoManager  = Substitute.For <IVideoManager>();
            ICookieManager cookieManager = Substitute.For <ICookieManager>();

            long         testId     = 1;
            List <Video> nullVideos = null;

            unitOfWork.Videos.GetVideosByModuleContentId(testId).Returns(nullVideos);

            var videosController = new VideosController(unitOfWork, videoManager, cookieManager);

            var result = await videosController.GetVideosByModuleContentId(testId);

            var notFoundObjectResult = Assert.IsType <NotFoundObjectResult>(result);
            var returnValue          = Assert.IsType <long>(notFoundObjectResult.Value);

            Assert.Equal(testId, returnValue);
        }
        public async void GetVideosByModuleContentId_CalledWithValidId_ReturnOkWithListOfVideo()
        {
            IUnitOfWork    unitOfWork    = Substitute.For <IUnitOfWork>();
            IVideoManager  videoManager  = Substitute.For <IVideoManager>();
            ICookieManager cookieManager = Substitute.For <ICookieManager>();

            long testId            = 1;
            var  testModuleContent = new ModuleContent()
            {
                Id = testId
            };
            var testVideos = new List <Video>()
            {
                new Video()
                {
                    ModuleContent = testModuleContent
                }, new Video()
                {
                    ModuleContent = testModuleContent
                }, new Video()
                {
                    ModuleContent = testModuleContent
                }
            };

            unitOfWork.Videos.GetVideosByModuleContentId(testId).Returns(testVideos);

            var videosController = new VideosController(unitOfWork, videoManager, cookieManager);

            var result = await videosController.GetVideosByModuleContentId(testId);

            var okObjectResult = Assert.IsType <OkObjectResult>(result);
            var returnValue    = Assert.IsType <List <Video> >(okObjectResult.Value);

            Assert.Equal(testVideos.Count, returnValue.Count);
            Assert.Equal(testId, returnValue[0].ModuleContent.Id);
        }