Esempio n. 1
0
        public void GivenIngredientId_WhenNotExist_ShouldThrowArgumentNullException()
        {
            _systemUnderTests = new GetIngredientQueryHandler(Mock.Of <IIngredientRepository>());
            Action action = () => _systemUnderTests.Handle(_query);

            action.Should().Throw <ArgumentNullException>();
        }
Esempio n. 2
0
        public void GivenIngredientId_WhenExist_ShouldReturnIngredient()
        {
            _ingredientRepositoryMock.Setup(x => x.GetById(It.IsAny <Guid>()))
            .Returns(_ingredient);
            var result = _systemUnderTests.Handle(_query);

            result.Should().NotBeNull();
        }