Exemple #1
0
        public async Task GetVideosByKindId_should_thrown_exception_with_null_id()
        {
            //Arrange
            KindService sut = new KindService(KindRepo, VideoRepo, Mapper);

            //Act, Assert
            await Assert.ThrowsAsync <ArgumentNullException>(() => sut.GetVideosByKindIdAsync(null));
        }
Exemple #2
0
        public async Task GetVideosByKindId_should_return_specified_videos(string guid)
        {
            //Arrange
            KindService sut = new KindService(KindRepo, VideoRepo, Mapper);

            //Act
            IEnumerable <VideoResponse> result = await sut.GetVideosByKindIdAsync(new GetKindRequest()
            {
                Id = new Guid(guid)
            });

            //Assert
            Assert.Equal(2, result.Count());
            Assert.NotNull(result.First().AltTitle);
        }