public override bool CanValidate(Type type) { return (type == _type || _type == null); } public override void Validate(object value) {
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))); }