public void CreateFoundMessageElement()
        {
            FoundMessage foundMessageItem=new FoundMessage(FILE_LINE_DUMMY,MESSAGE_NAME,LINE_DUMMY,PROCESS_DUMMY);

            XmlElement createdMessageElement=elementCreator.CreateMessageElement(parentElement,foundMessageItem,sourceLifelineElement,destinationLifelineElement);
            System.Console.WriteLine(modelElement.OuterXml);
            System.Console.WriteLine("*********************************");
            /*	Assert.IsNotNull(createdMessageElement);
            AssertXML.AssertTypeNameOfElement(createdMessageElement,MESSAGE_ELEMENT_TYPE_NAME);
            AssertXML.AssertNamespacePrefixOfElement(createdMessageElement,EMPTY_STRING);
            AssertXML.AssertOwnedAttributesCount(createdMessageElement,OWNED_ATTRIBUTES_COUNT_CASE_FOUND_MESSAGE);
            AssertXML.AssertChildElementsCount(parentElement,EXPECTED_CHILD_COUNT_CASE_FOUND_MESSAGE);
            AssertXML.AssertIsChildElementOf(parentElement,createdMessageElement,XPathQuerys.MESSAGE_ELEMENT_PATH,namespaceManager);
            AssertXML.AssertIsXmiAttributeOf(createdMessageElement,XmiElements.XMI_ID_ATTR_NAME,XmiElements.XMI_NAMESPACE_URI);
            AssertXML.AssertIsCorrectXmiAttributeValue(createdMessageElement,XmiElements.XMI_ID_ATTR_NAME,XmiElements.XMI_NAMESPACE_URI,ID_OF_FIRST_XMI_ELEMENT);
            AssertXML.AssertIsXmiAttributeOf(createdMessageElement,XmiElements.XMI_TYPE_ATTR_NAME,XmiElements.XMI_NAMESPACE_URI);
            AssertXML.AssertIsCorrectXmiAttributeValue(createdMessageElement,XmiElements.XMI_TYPE_ATTR_NAME,XmiElements.XMI_NAMESPACE_URI,XMI_TYPE_ATTRIBUTE_VALUE);
            AssertXML.AssertIsUmlAttributeOf(createdMessageElement,UmlModelElements.NAME_ATTR_NAME,this.namespaceManager);
            AssertXML.AssertValueOfUmlAttribute(createdMessageElement,UmlModelElements.NAME_ATTR_NAME,this.namespaceManager,MESSAGE_NAME);
            VerifyMessageOccurrenceSpecElement(ID_RECEIVE_EVENT_ELEMENT_CASE_FOUND_MESSAGE,ID_OF_FIRST_XMI_ELEMENT,ID_LIFELINE_DESTINATION);
            AssertXML.AssertIsUmlAttributeOf(createdMessageElement,UmlModelElements.MESSAGE_SORT_ATTR_NAME,this.namespaceManager);
            AssertXML.AssertValueOfUmlAttribute(createdMessageElement,UmlModelElements.MESSAGE_SORT_ATTR_NAME,this.namespaceManager,UmlModelElements.MESSAGE_SORT_ASYNCH_CALL);
            AssertXML.AssertIsUmlAttributeOf(createdMessageElement,UmlModelElements.MESSAGE_KIND_ATTR_NAME,this.namespaceManager);
            AssertXML.AssertValueOfUmlAttribute(createdMessageElement,UmlModelElements.MESSAGE_KIND_ATTR_NAME,this.namespaceManager,UmlModelElements.MESSAGE_KIND_FOUND);

            AssertXML.AssertIsUmlAttributeOf(createdMessageElement,UmlModelElements.RECEIVE_EVENT_ATTR_NAME,this.namespaceManager);
            AssertXML.AssertValueOfUmlAttribute(createdMessageElement,UmlModelElements.RECEIVE_EVENT_ATTR_NAME,this.namespaceManager,ID_RECEIVE_EVENT_ELEMENT_CASE_FOUND_MESSAGE);
            uint newIdCount=documentBuilder.CurrentXmiIdCount;
            Assert.IsTrue(EXPECTED_ID_COUNT==2);*/
        }
Ejemplo n.º 2
0
 private void InterpretFoundMessageItem(XmlElement interactionElement,FoundMessage foundMessageItem)
 {
     int destinationLifelineItemId=foundMessageItem.Process;
     XmlElement destinationLifelineElement=this.GetXmiElementByItemId(destinationLifelineItemId);
     xmiDocumentBuilder.AddMessageElement(interactionElement,foundMessageItem,null,destinationLifelineElement);
 }