Exemple #1
0
        public void Relation_Inheritance_WriteTo()
        {
            var relation = new Relation(Car, Vehicle, RelationType.Inheritance);

            var relationWriter = new RelationWriter(new DiagramContentMixin());
            var result = relation.WriteTo(relationWriter);
            var umlText = result.Finish().ToString();

            Assert.AreEqual("[Car]-^[Vehicle]", umlText);
        }
Exemple #2
0
        public void Relation_Composition_WriteTo()
        {
            var relation = new Relation(Car, Wheel, RelationType.Composition, "has", 4.ToString());
            
            var relationWriter = new RelationWriter(new DiagramContentMixin());
            var result = relation.WriteTo(relationWriter);
            var umlText = result.Finish().ToString();

            Assert.AreEqual("[Car]has++-4[Wheel]", umlText);
        }
 public ChangeAssocationTypeEvent(Relation relation)
 {
     Relation = relation;
 }
 public ChangeAssociationTargetEvent(Relation relation, Classifier newTarget)
 {
     _relation = relation;
     _newTarget = newTarget;
 }