コード例 #1
0
        public async Task GetRecentVideos_GreaterQtyRequestedThanActualReturnsAllActual_ListCountEqualsActual()
        {
            const int expectedCount = 29;
            var       videoCombiner = new IntegrationVideoCombiner(new YoutubeDataClientFake(), new TwitchClientFake(), new FakeBrothershipUnitOfWork());
            var       videos        = await videoCombiner.GetRecentVideos(1, 50);

            Assert.IsTrue(videos.Count == expectedCount);
        }
コード例 #2
0
        public async Task GetRecentVideos_VideosReturned_ReturnedListNotNull()
        {
            var videoCombiner = new IntegrationVideoCombiner(new YoutubeDataClientFake(), new TwitchClientFake(), new FakeBrothershipUnitOfWork());
            var videos        = await videoCombiner.GetRecentVideos(1, 20);

            Assert.IsTrue(videos.Count > 1);
            foreach (var video in videos)
            {
                System.Diagnostics.Debug.WriteLine(video.Id + " " + video.ContentType + " " + video.UploadTime);
            }
        }
コード例 #3
0
        public async Task GetRecentVideos_ReturnVideosAreNotTheSame_ItemsInOrder()
        {
            var videoCombiner = new IntegrationVideoCombiner(new YoutubeDataClientFake(), new TwitchClientFake(), new FakeBrothershipUnitOfWork());
            var videos        = await videoCombiner.GetRecentVideos(1, 25);

            VideoContent previousVideo = null;

            foreach (var video in videos)
            {
                System.Diagnostics.Debug.WriteLine(video.Id + " " + video.ContentType + " " + video.UploadTime);
            }

            foreach (var video in videos)
            {
                Assert.IsTrue(videos.Count(p => p.Id == video.Id) <= 1);

                previousVideo = video;
            }
        }