public void AddInheritance_should_create_InheritanceValidator() { _validator.RuleFor(x => x.Vehicle).AddInheritance(inheritance => { }); var rule = (PropertyRule)_validator.First(); var validator = (ChildValidatorAdaptor)rule.CurrentValidator; validator.ValidatorType.ShouldEqual(typeof(InheritanceValidator <IVehicle>)); }
private void AssertValidator <TValidator>() { var rule = (PropertyRule)validator.First(); rule.CurrentValidator.ShouldBe <TValidator>(); }