public async Task GetKind_should_thrown_exception_with_null_id() { //Arrange KindService sut = new KindService(KindRepo, VideoRepo, Mapper); //Act, Assert await Assert.ThrowsAsync <ArgumentNullException>(() => sut.GetKindAsync(null)); }
public async Task GetKind_should_return_all_Kinds() { //Arrange KindService sut = new KindService(KindRepo, VideoRepo, Mapper); //Act IEnumerable <KindResponse> result = await sut.GetKindAsync(); //Assert result.Should().HaveCountGreaterOrEqualTo(2); Assert.NotNull(result.First().Name); }
public async Task GetKind_should_return_kind_with_specified_id(string guid) { //Arrange KindService sut = new KindService(KindRepo, VideoRepo, Mapper); //Act KindResponse result = await sut.GetKindAsync(new GetKindRequest() { Id = new Guid(guid) }); //Assert result.KindId.Should().Be(new Guid(guid)); Assert.NotNull(result.Name); }