public void Success () { SubclassTypeValidator v = new SubclassTypeValidator (typeof (A)); v.Validate (typeof (B)); v.Validate (typeof (A)); }
public void CanValidate () { SubclassTypeValidator v = new SubclassTypeValidator (typeof (A)); Assert.IsFalse (v.CanValidate (typeof (string))); Assert.IsFalse (v.CanValidate (typeof (int))); Assert.IsFalse (v.CanValidate (typeof (object))); Assert.IsTrue (v.CanValidate (typeof (Type))); }
public PolicyImporterElement(Type type) { SubclassTypeValidator validator = new SubclassTypeValidator(typeof(IPolicyImportExtension)); validator.Validate(type); this.Type = type.AssemblyQualifiedName; }
public void Failure () { SubclassTypeValidator v = new SubclassTypeValidator (typeof (B)); v.Validate (typeof (A)); }