Example #1
0
        public void BBlocked_WhenDeleteValidated_ReturnsTrue()
        {
            //Arrange: a drink is created
            BDrink drink = new BDrink();

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

            //Assert: The drink is valid for updating.
            Assert.AreEqual(true, 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);
        }
Example #3
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 #4
0
        public void BDrink_WhenCheckedForEquivilance_AlwaysIsFalse()
        {
            //Arrange: a drink is created
            BDrink drink = new BDrink();

            //Act: The drink is checked to be equivilant to itself.
            bool equals = false;// drink.Equivilant(drink);

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