public void BDrinkWithValidMembers_WhenCreateValidated_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 create valid. bool valid = drink.CreateValid(); //Assert: The drink is valid for creation. Assert.AreEqual(true, valid); }
public void BDrinkWithInvalidMembers_WhenCreateValidated_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 create valid. bool valid = drink.CreateValid(); //Assert: The drink is not valid for creation. Assert.AreEqual(false, valid); }