public void BUnitWithValidMembers_WhenCreateValidated_ReturnsTrue() { //Arrange: a unit with all valid members is created. BUnit unit = new BUnit { Long_Name = "Long", Short_Name = "SA" }; //Act: The unit is checked if it is create valid. bool valid = unit.CreateValid(); //Assert: The unit is valid for creation. Assert.AreEqual(true, valid); }
public void BUnitWithInvalidMembers_WhenCreateValidated_ReturnsFalse() { //Arrange: a unit with all invalid members is created. BUnit unit = new BUnit{ Long_Name = "1234567890123456789012345678901234567890123456789012345678901234567890", Short_Name = "1234567890" }; //Act: The unit is checked if it is create valid. bool valid = unit.CreateValid(); //Assert: The unit is not valid for creation. Assert.AreEqual(false, valid); }