public void ValidateCustomAttribute() { _person = SamplePerson.GetSamplePerson(); Debug.Assert(_person.Validate(), "Custom Validation failed"); _person.Custom = "0"; Debug.Assert(!_person.Validate(), "Custom Validation failed"); }
public void ValidateIdentityAttribute() { _person = SamplePerson.GetSamplePerson(); _person.Identity = 0; Debug.Assert(_person.Validate(), "Identity Validation unexpected fail"); _person.Identity = 1; Debug.Assert(_person.Validate(), "Identity Validation unexpected fail"); }
public void ValidateIntegerAttribute() { _person = SamplePerson.GetSamplePerson(); _person.FkMother = 0; Debug.Assert(!_person.Validate(), "Integer Validation failed"); _person.FkMother = 1; Debug.Assert(_person.Validate(), "Integer Validation unexpected fail"); _person.FkCompany = 0; Debug.Assert(_person.Validate(), "Integer Validation unexpected fail"); }
public void ValidateStringAttribute() { _person = SamplePerson.GetSamplePerson(); _person.Lastname = "Testname"; Debug.Assert(_person.Validate(), "Required string check failed"); _person.Firstname = "Something"; Debug.Assert(_person.Validate(), "Optional string check failed"); _person.Lastname = ""; Debug.Assert(!_person.Validate(), "Required string check failed"); _person.Firstname = ""; Debug.Assert(!_person.Validate(), "Optional string check failed"); _person.Firstname = "12345678910"; Debug.Assert(!_person.Validate(), "String overflow failure"); }