public void SAStudentFullNameCompute_NameAndLastNameIsNotEmpty_ShouldBeEqualToNameAndLastName() { var student = new SAStudent(Context); student.Name = "Brent"; student.LastName = "Esh"; Assert.AreEqual("Brent Esh", student.FullName); }
public void SAStudentFullNameCompute_NameIsEmptyLastNameIsNotEmpty_ShouldBeEqualToLastName() { var student = new SAStudent(Context); student.Name = string.Empty; student.LastName = "Esh"; Assert.AreEqual("Esh", student.FullName); }
public void SAStudentFullNameCompute_NameAndLastNameIsEmpty_ShouldBeEmpty() { var student = new SAStudent(Context); student.Name = string.Empty; student.LastName = string.Empty; Assert.AreEqual(string.Empty, student.FullName); }
public void SAStudent_FullName_Validate(SAStudent entity, ValidateEventArgs <string> e) { var result = IsFullNameValid(e.NewValue); if (result >= 0) { entity.Message(e, (uint)result); } }
public void SAStudent_FullName_Compute(SAStudent entity, ComputeEventArgs <string> e) { e.NewValue = $"{entity.Name} {entity.LastName}"; }