Exemple #1
0
        public void BIngredientWithValidMembers_WhenUpdateValidated_ReturnsTrue()
        {
            //Arrange: a ingredient with all valid members is created.
            BIngredient ingredient = new BIngredient{
                Long_Name = "Long",
                Short_Name = "SN"
            };

            //Act: The ingredient is checked if it is update valid.
            bool valid = ingredient.UpdateValid();

            //Assert: The ingredient is valid for updating.
            Assert.AreEqual(true, valid);
        }
Exemple #2
0
        public void BIngredientWithInvalidMembers_WhenUpdateValidated_ReturnsFalse()
        {
            //Arrange: a ingredient with all invalid members is created.
            BIngredient ingredient = new BIngredient{
                Long_Name = "1234567890123456789012345678901234567890",
                Short_Name = null
            };

            //Act: The ingredient is checked if it is update valid.
            bool valid = ingredient.UpdateValid();

            //Assert: The ingredient is not valid for updating.
            Assert.AreEqual(false, valid);
        }