コード例 #1
0
        public void GivenIngredientId_WhenNotExist_ShouldThrowArgumentNullException()
        {
            _systemUnderTests = new GetIngredientQueryHandler(Mock.Of <IIngredientRepository>());
            Action action = () => _systemUnderTests.Handle(_query);

            action.Should().Throw <ArgumentNullException>();
        }
コード例 #2
0
 public void SetUp()
 {
     _ingredient       = FakeIngredientFactory.CreateValidIngredient("IngredientName", _ingredientRepositoryMock.Object);
     _query            = new GetIngredientQuery(Guid.NewGuid());
     _systemUnderTests = new GetIngredientQueryHandler(_ingredientRepositoryMock.Object);
 }