public void TestSuccess () { hit_success = false; CallbackValidator v = new CallbackValidator (typeof (int), success); v.Validate (5); Assert.IsTrue (hit_success, "A1"); }
public void CanValidate () { CallbackValidator v = new CallbackValidator (typeof (int), success); Assert.IsFalse (v.CanValidate (typeof (string))); Assert.IsTrue (v.CanValidate (typeof (int))); Assert.IsFalse (v.CanValidate (typeof (object))); }
public void TestFailure2 () { hit_failure = false; CallbackValidator v = new CallbackValidator (typeof (int), failure); try { v.Validate (5); } catch { } finally { Assert.IsTrue (hit_failure, "A1"); } }
public void TestFailure1 () { CallbackValidator v = new CallbackValidator (typeof (int), failure); v.Validate (5); }
public void NullType () { CallbackValidator v = new CallbackValidator (null, success); }
public void NullCallback () { CallbackValidator v = new CallbackValidator (typeof (int), null); }