public void should_have_error_when_ArtistId_is_null() { var addItemCommand = new AddItemCommand { Price = new Money() }; _validator.ShouldHaveValidationErrorFor(x => x.GenreId, addItemCommand); }
public void should_have_error_when_ArtistId_doesnt_exist() { _mediatorMock .Setup(x => x.Send(It.IsAny <GetArtistCommand>(), CancellationToken.None)) .ReturnsAsync(() => null); var addItemCommand = new AddItemCommand { Price = new Money(), ArtistId = Guid.NewGuid() }; _validator.ShouldHaveValidationErrorFor(x => x.ArtistId, addItemCommand); }