Пример #1
0
        private FragmentPresenceRule CreateRule()
        {
            var rule = new FragmentPresenceRule();

            rule.SpecificConfiguration.AffectedFragmentTypes.Add(typeof(SelectStarExpression));
            rule.SpecificConfiguration.ViolationMessage = "Don't use * in select clause";
            return(rule);
        }
Пример #2
0
        public void FragmentPresenceRuleConfigControl_AcceptsSpecificConfiguration()
        {
            // Arrange
            var guiControl = new FragmentPresenceRuleConfigControl();
            var rule       = new FragmentPresenceRule();

            // Act
            guiControl.FillControl(rule.SpecificConfiguration);
            guiControl.FillModel(rule.SpecificConfiguration);

            // Assert
        }