public async Task EditVideo_should_return_the_expected_video(string kindId, string genreId) { //Arrange string data = GenData.Create <string>(); EditVideoRequest expectedVideo = new EditVideoRequest() { Id = new Guid("eaa0B9d4-4A2d-496e-8a68-a36cd0758abb"), AltTitle = data, Description = data, IsInactive = false, Duration = 123, Episode = 7, ReleaseYear = DateTime.Now, Season = 1, Title = data, KindId = new Guid(kindId), GenreId = new Guid(genreId) }; VideoService sut = new VideoService(Repository, Mapper); //Act VideoResponse result = await sut.EditVideoAsync(expectedVideo); //Assert result.Should().BeEquivalentTo(expectedVideo, o => o.Excluding(x => x.IsInactive)); }
public async Task AddVideo_should_return_the_expected_video(string kindId, string genreId) { //Arrange string data = GenData.Create <string>(); AddVideoRequest expectedVideo = new AddVideoRequest() { AltTitle = data, Description = data, Duration = 123, Episode = 7, ReleaseYear = DateTime.Now, Season = 1, Title = data, KindId = new Guid(kindId), GenreId = new Guid(genreId) }; VideoService sut = new VideoService(Repository, Mapper); //Act VideoResponse result = await sut.AddVideoAsync(expectedVideo); //Assert result.Should().BeEquivalentTo(expectedVideo); }