Esempio n. 1
0
        public void IsSameRule_ArchitecturalRule_Success()
        {
            var rule = new ArchitecturalRule()
            {
                OriginLayer   = "Origin",
                TargetLayer   = "Target",
                RuleOperator  = RuleOperator.CanNotRelate,
                RelationTypes = new List <RelationType>()
                {
                    RelationType.Declarate, RelationType.Indirect
                }
            };

            var anotherRule = new ArchitecturalRule()
            {
                OriginLayer   = "Origin",
                TargetLayer   = "Target",
                RuleOperator  = RuleOperator.CanNotRelate,
                RelationTypes = new List <RelationType>()
                {
                    RelationType.Declarate, RelationType.Indirect
                }
            };

            Assert.True(rule.IsSameRule(anotherRule));
        }
Esempio n. 2
0
        public void IsSameRule_ArchitecturalRule_Success_DifferentOriginLayer()
        {
            var rule = new ArchitecturalRule()
            {
                OriginLayer = "Origin"
            };

            var anotherRule = new ArchitecturalRule()
            {
                OriginLayer = "Test"
            };

            Assert.False(rule.IsSameRule(anotherRule));
        }
Esempio n. 3
0
        public void IsSameRule_ArchitecturalRule_Success_DifferentRuleOperator()
        {
            var rule = new ArchitecturalRule()
            {
                OriginLayer  = "Origin",
                TargetLayer  = "Target",
                RuleOperator = RuleOperator.CanNotRelate
            };

            var anotherRule = new ArchitecturalRule()
            {
                OriginLayer  = "Origin",
                TargetLayer  = "Target",
                RuleOperator = RuleOperator.NeedToRelate
            };

            Assert.False(rule.IsSameRule(anotherRule));
        }
Esempio n. 4
0
        public void IsSameRule_ArchitecturalRule_Success_DifferentRelationTypesCount()
        {
            var rule = new ArchitecturalRule()
            {
                RelationTypes = new List <RelationType>()
                {
                    RelationType.Declarate
                }
            };

            var anotherRule = new ArchitecturalRule()
            {
                RelationTypes = new List <RelationType>()
                {
                    RelationType.Declarate, RelationType.Inheritance
                }
            };

            Assert.False(rule.IsSameRule(anotherRule));
        }
Esempio n. 5
0
        public void IsSameRule_ArchitecturalRule_Success_NullRule()
        {
            var rule = new ArchitecturalRule();

            Assert.False(rule.IsSameRule(null));
        }