コード例 #1
0
        public void Test_GetEfferentRelationshipWith_ReturnsCyclicRelationship_WhenTheSameElementIsSpecifiedAndACyclicRelationshipExists()
        {
            SoftwareSystem softwareSystem1 = Model.AddSoftwareSystem("System 1", "");

            softwareSystem1.Uses(softwareSystem1, "uses");

            Relationship relationship = softwareSystem1.GetEfferentRelationshipWith(softwareSystem1);

            Assert.Same(softwareSystem1, relationship.Source);
            Assert.Equal("uses", relationship.Description);
            Assert.Same(softwareSystem1, relationship.Destination);
        }
コード例 #2
0
        public void Test_GetEfferentRelationshipWith_ReturnsTheRelationship_WhenThereIsARelationship()
        {
            SoftwareSystem softwareSystem1 = Model.AddSoftwareSystem("System 1", "");
            SoftwareSystem softwareSystem2 = Model.AddSoftwareSystem("System 2", "");

            softwareSystem1.Uses(softwareSystem2, "uses");

            Relationship relationship = softwareSystem1.GetEfferentRelationshipWith(softwareSystem2);

            Assert.Same(softwareSystem1, relationship.Source);
            Assert.Equal("uses", relationship.Description);
            Assert.Same(softwareSystem2, relationship.Destination);
        }
コード例 #3
0
        public void Test_GetEfferentRelationshipWith_ReturnsNull_WhenTheSameElementIsSpecifiedAndNoCyclicRelationshipExists()
        {
            SoftwareSystem softwareSystem1 = Model.AddSoftwareSystem("System 1", "");

            Assert.Null(softwareSystem1.GetEfferentRelationshipWith(softwareSystem1));
        }
コード例 #4
0
        public void Test_GetEfferentRelationshipWith_ReturnsNull_WhenANullElementIsSpecified()
        {
            SoftwareSystem softwareSystem1 = Model.AddSoftwareSystem("System 1", "");

            Assert.Null(softwareSystem1.GetEfferentRelationshipWith(null));
        }