public void BPlaceWithValidMembers_WhenCreateValidated_ReturnsTrue() { //Arrange: An place with all valid members is created. BPlace place = new BPlace{ Short_Name = "SA", Long_Name = "Long name" }; //Act: the place is checked if it is create valid. bool valid = place.CreateValid(); //Assert: the place is valid for creation. Assert.AreEqual(true, valid); }
public void BPlaceWithInvalidMembers_WhenCreateValidated_ReturnsFalse() { //Arrange: An place with all invalid members is created. BPlace place = new BPlace{ Short_Name = "123", Long_Name = null }; //Act: the place is checked if it is create valid. bool valid = place.CreateValid(); //Assert: the place is not valid for creation. Assert.AreEqual(false, valid); }