public void CreateMessageOccurrenceSpecElementASSignalReceive()
 {
     elementCreator=new MessageOccurrenceSpecElementCreator(xmiDocument,documentBuilder,MESSAGE_SORT_ASYNCH_SIGNAL,EventKind.ReceiveEvent);
     XmlElement messageOccurrenceSpecificationElement=elementCreator.CreateMessageOccurrenceSpecificationElement(parentElement,lifelineElement,MESSAGE_ELEMENT_ID);
     System.Console.WriteLine(modelElement.OuterXml);
     System.Console.WriteLine("****************************************************");
 }
        public void CreateMessageOccurrenceSpecElementSMessageReceive()
        {
            elementCreator=new MessageOccurrenceSpecElementCreator(xmiDocument,documentBuilder,MESSAGE_SORT_SYNCH_CALL,EventKind.ReceiveEvent);
            XmlElement messageOccurrenceSpecificationElement=elementCreator.CreateMessageOccurrenceSpecificationElement(parentElement,lifelineElement,MESSAGE_ELEMENT_ID);
            System.Console.WriteLine(modelElement.OuterXml);
            System.Console.WriteLine("****************************************************");

            /*
            Assert.IsNotNull(messageOccurrenceSpecificationElement);
            AssertXML.AssertTypeNameOfElement(messageOccurrenceSpecificationElement,MESSAGE_OCCURRENCE_SPEC_ELEMENT_TYPE_NAME);
            AssertXML.AssertNamespacePrefixOfElement(messageOccurrenceSpecificationElement,EMPTY_STRING);
            AssertXML.AssertOwnedAttributesCount(messageOccurrenceSpecificationElement,OWNED_ATTRIBUTES_COUNT);
            AssertXML.AssertChildElementsCount(parentElement,EXPECTED_CHILD_COUNT_CASE_1);
            AssertXML.AssertIsChildElementOf(parentElement,messageOccurrenceSpecificationElement,XPathQuerys.MESSAGE_OCCURRENCE_SPECIFICATION_ELEMENT_PATH,namespaceManager);
            AssertXML.AssertIsXmiAttributeOf(messageOccurrenceSpecificationElement,XmiElements.XMI_ID_ATTR_NAME,XmiElements.XMI_NAMESPACE_URI);
            AssertXML.AssertIsCorrectXmiAttributeValue(messageOccurrenceSpecificationElement,XmiElements.XMI_ID_ATTR_NAME,XmiElements.XMI_NAMESPACE_URI,ID_OF_FIRST_XMI_ELEMENT);
            AssertXML.AssertIsXmiAttributeOf(messageOccurrenceSpecificationElement,XmiElements.XMI_TYPE_ATTR_NAME,XmiElements.XMI_NAMESPACE_URI);
            AssertXML.AssertIsCorrectXmiAttributeValue(messageOccurrenceSpecificationElement,XmiElements.XMI_TYPE_ATTR_NAME,XmiElements.XMI_NAMESPACE_URI,XMI_TYPE_ATTRIBUTE_VALUE);
            AssertXML.AssertIsUmlAttributeOf(messageOccurrenceSpecificationElement,UmlModelElements.MESSAGE_ATTR_NAME,this.namespaceManager);
            AssertXML.AssertValueOfUmlAttribute(messageOccurrenceSpecificationElement,UmlModelElements.MESSAGE_ATTR_NAME,this.namespaceManager,MESSAGE_ELEMENT_ID);

            AssertXML.AssertChildElementsCount(messageOccurrenceSpecificationElement,1);
            XmlElement coveredAttributeElement=(XmlElement)messageOccurrenceSpecificationElement.FirstChild;
            AssertXML.AssertNamespacePrefixOfElement(coveredAttributeElement,EMPTY_STRING);
            AssertXML.AssertTypeNameOfElement(coveredAttributeElement,XmiElements.COVERED_ELEMENT_NAME);
            AssertXML.AssertChildElementsCount(coveredAttributeElement,0);
            AssertXML.AssertIsXmiAttributeOf(coveredAttributeElement,XmiElements.XMI_IDREF_ATTR_NAME,XmiElements.XMI_NAMESPACE_URI);
            AssertXML.AssertIsCorrectXmiAttributeValue(coveredAttributeElement,XmiElements.XMI_IDREF_ATTR_NAME,XmiElements.XMI_NAMESPACE_URI,LIFELINE_ID);

            uint newIdCount=documentBuilder.CurrentXmiIdCount;
            Assert.IsTrue(expectedIdCount==2);*/
        }
 private XmlElement CreateMessageOccurrenceSpecElement(XmlElement parentElement,XmlElement messageElement,XmlElement lifelineElement,EventKind eventKind)
 {
     string messageElementID=messageElement.GetAttribute(UmlModel.XMI_ID_ATTR_COMPLETE_NAME);
     string messageSort=messageElement.GetAttribute(UmlModel.MESSAGE_SORT_ATTR_NAME);
     MessageOccurrenceSpecElementCreator elementCreator=
                 new MessageOccurrenceSpecElementCreator(this.XmiDocument,this.XmiDocumentBuilder,messageSort,eventKind);
     XmlElement newMessageOccurenceSpecElement=elementCreator.CreateMessageOccurrenceSpecificationElement(parentElement,lifelineElement,messageElementID);
     return newMessageOccurenceSpecElement;
 }
 public XmlElement AddMessageOccurrenceSpecificationElement(XmlElement parentElement, string messageID,XmlElement lifeline)
 {
     MessageOccurrenceSpecElementCreator elementCreator=new MessageOccurrenceSpecElementCreator(xmiDocument,this);
     XmlElement newMessageOccurrenceSpecElement=elementCreator.CreateMessageOccurrenceSpecificationElement(parentElement,lifeline, messageID);
     return newMessageOccurrenceSpecElement;
 }