public void TestObjectPass()
 {
     SampleValidationClass val = new SampleValidationClass();
     val.RecordID = 1;
     val.RecordName = "TestRecord";
     bool tryit = val.TryValidate();
     Assert.IsTrue(tryit);
 }
 public void TestObjectFail()
 {
     SampleValidationClass obj = new SampleValidationClass();
     bool tryit = obj.TryValidate();
     Assert.IsFalse(tryit);
     List<ValidationResult> results = obj.Validate();
     Assert.IsTrue(results.Count > 0);
 }