Example #1
0
        public IDsmRelation ImportRelation(int relationId, int consumerId, int providerId, string type, int weight, bool deleted)
        {
            DsmRelation relation = new DsmRelation(relationId, consumerId, providerId, type, weight);

            _relations.Add(relation);
            return(relation);
        }
Example #2
0
        public void WhenRelationIsConstructedThenPropertiesAreSetAccordingArguments()
        {
            int         relationId   = 1;
            int         consumerId   = 2;
            int         providerId   = 3;
            string      relationType = "include";
            int         weight       = 4;
            DsmRelation relation     = new DsmRelation(relationId, consumerId, providerId, relationType, weight);

            Assert.AreEqual(relationId, relation.Id);
            Assert.AreEqual(consumerId, relation.ConsumerId);
            Assert.AreEqual(providerId, relation.ProviderId);
            Assert.AreEqual(relationType, relation.Type);
            Assert.AreEqual(weight, relation.Weight);
        }