public void GivenIngredientId_WhenNotExist_ShouldThrowArgumentNullException() { _systemUnderTests = new GetIngredientQueryHandler(Mock.Of <IIngredientRepository>()); Action action = () => _systemUnderTests.Handle(_query); action.Should().Throw <ArgumentNullException>(); }
public void GivenIngredientId_WhenExist_ShouldReturnIngredient() { _ingredientRepositoryMock.Setup(x => x.GetById(It.IsAny <Guid>())) .Returns(_ingredient); var result = _systemUnderTests.Handle(_query); result.Should().NotBeNull(); }