Example #1
0
        public void BDrinkWithInvalidMembers_WhenUpdateValidated_ReturnsFalse()
        {
            //Arrange: a drink with all invalid members is created.
            BDrink drink = new BDrink{
                username = "******",
                Name = "1234567890123456789012345678901234567890",
                Definition = null
            };

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

            //Assert: The drink is not valid for updating.
            Assert.AreEqual(false, valid);
        }
Example #2
0
        public void BDrinkWithValidMembers_WhenUpdateValidated_ReturnsTrue()
        {
            //Arrange: a drink with all valid members is created.
            BDrink drink = new BDrink{
                username = "******",
                Name = "name",
                Definition = "definition"
            };

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

            //Assert: The drink is valid for updating.
            Assert.AreEqual(true, valid);
        }