public void getartist_should_thrown_exception_with_null_id() { var repository = new ArtistRepository(_catalogDataContextFactory.ContextInstance); var sut = new GetArtistHandler(repository); sut.Handle(null, CancellationToken.None).ShouldThrow <ArgumentNullException>(); }
public async Task getartist_should_return_right_artist(string id) { var repository = new ArtistRepository(_catalogDataContextFactory.ContextInstance); var sut = new GetArtistHandler(repository); var result = await sut.Handle(new GetArtistCommand { Id = new Guid(id) }, CancellationToken.None); result.ShouldNotBeNull(); }