public override void Setup(ValidationRulesEngine engine)
 {
     engine.AddRule(new EntityNamingRule());
     engine.AddRule(new DatabaseNamingRule());
     engine.AddRule(new AllColumnsHaveADataTypeRule());
     engine.AddRule(new AllPropertiesHaveADataTypeRule());
     engine.AddRule(new AllComponentPropertiesHaveADataTypeRule());
     engine.AddRule(new CheckEntityComponentsRule());
     engine.AddRule(new CheckSchemaAgainstRealDatabaseRule(_database));
     engine.AddRule(new CheckReferenceCollectionTypeRule());
     engine.AddRule(new CheckLazyPropertiesHaveLazyEntityRule());
     engine.AddRule(new CheckEntityInheritanceForTablePerConcreteClassRule());
     engine.AddRule(new CheckEntityInheritanceForTablePerHierarchyRule());
     engine.AddRule(new CheckEntityInheritanceForTablePerSubclassRule());
 }
        public void SetUp()
        {
            mappingSet = new MappingSetImpl();
            engine = new ValidationRulesEngine(mappingSet);

            rule1 = MockRepository.GenerateMock<IValidationRule>();
            rule2 = MockRepository.GenerateMock<IValidationRule>();
            result1 = new ValidationResult(rule1);
            result2 = new ValidationResult(rule2);

            rule1.Stub(r => r.Run(mappingSet)).Return(result1);
            rule2.Stub(r => r.Run(mappingSet)).Return(result2);

            engine.AddRule(rule1);
            engine.AddRule(rule2);
        }
예제 #3
0
 public abstract void Setup(ValidationRulesEngine engine);
예제 #4
0
 public abstract void Setup(ValidationRulesEngine engine);