1
0
mirror of https://github.com/octoleo/plantuml.git synced 2024-12-29 21:26:36 +00:00
plantuml/test/nonreg/xmi/clazz/XMI0004_Test.java
Daum Alexander (DCL ATV SC D RAD CSFW FW) 124aa0384c Introduce XMI_SCRIPT file type
XMI_SCRIPT is intented to be used to generate XMI files, that contain as
much metadata (UML standard compliant), that can be generated by
plantuml.
2024-02-28 11:06:13 +01:00

141 lines
4.3 KiB
Java

package nonreg.xmi.clazz;
import java.io.IOException;
import org.junit.jupiter.api.Test;
import nonreg.xmi.XmiTest;
/*
https://forum.plantuml.net/12972/only-the-first-line-any-component-description-exported-file
Test diagram MUST be put between triple quotes
"""
@startuml
class A {
}
class B{
}
A .> B
@enduml
"""
Expected result MUST be put between triple brackets
{{{star
<?xml version="1.0" encoding="UTF-8"?><XMI xmlns:UML="href://org.omg/UML/1.3" xmi.version="1.1">
<XMI.header>
<XMI.documentation>
<XMI.exporter>PlantUML</XMI.exporter>
</XMI.documentation>
<XMI.metamodel xmi.name="UML" xmi.version="1.4"/>
</XMI.header>
<XMI.content>
<UML:Model name="PlantUML" xmi.id="model1">
<UML:Namespace.ownedElement>
<UML:Class name="A" xmi.id="cl0002">
<UML:Classifier.feature/>
</UML:Class>
<UML:Class name="B" xmi.id="cl0003">
<UML:Classifier.feature/>
</UML:Class>
<UML:Association namespace="model1" xmi.id="ass5">
<UML:Association.connection>
<UML:AssociationEnd association="ass5" type="cl0002" xmi.id="end6">
<UML:AssociationEnd.participant/>
</UML:AssociationEnd>
<UML:AssociationEnd association="ass5" type="cl0003" xmi.id="end7">
<UML:AssociationEnd.participant/>
</UML:AssociationEnd>
</UML:Association.connection>
</UML:Association>
</UML:Namespace.ownedElement>
</UML:Model>
</XMI.content>
</XMI>
}}}star
{{{argo
<?xml version="1.0" encoding="UTF-8"?><XMI xmlns:UML="href://org.omg/UML/1.3" xmi.version="1.1">
<XMI.header>
<XMI.documentation>
<XMI.exporter>PlantUML</XMI.exporter>
</XMI.documentation>
<XMI.metamodel xmi.name="UML" xmi.version="1.4"/>
</XMI.header>
<XMI.content>
<UML:Model name="PlantUML" xmi.id="model1">
<UML:Namespace.ownedElement>
<UML:Class name="A" xmi.id="cl0002">
<UML:Classifier.feature/>
</UML:Class>
<UML:Class name="B" xmi.id="cl0003">
<UML:Classifier.feature/>
</UML:Class>
<UML:Association xmi.id="ass5">
<UML:Association.connection>
<UML:AssociationEnd association="ass5" type="cl0002" xmi.id="end6">
<UML:AssociationEnd.participant/>
</UML:AssociationEnd>
<UML:AssociationEnd association="ass5" type="cl0003" xmi.id="end7">
<UML:AssociationEnd.participant/>
</UML:AssociationEnd>
</UML:Association.connection>
</UML:Association>
</UML:Namespace.ownedElement>
</UML:Model>
</XMI.content>
</XMI>
}}}argo
{{{script
<?xml version="1.0" encoding="UTF-8"?><XMI xmlns:UML="href://org.omg/UML/1.3" xmi.version="1.1">
<XMI.header>
<XMI.documentation>
<XMI.exporter>PlantUML</XMI.exporter>
</XMI.documentation>
<XMI.metamodel xmi.name="UML" xmi.version="1.4"/>
</XMI.header>
<XMI.content>
<UML:Model name="PlantUML" xmi.id="model1">
<UML:Namespace.ownedElement>
<UML:Class name="A" xmi.id="cl0002">
<UML:Classifier.feature/>
</UML:Class>
<UML:Class name="B" xmi.id="cl0003">
<UML:Classifier.feature/>
</UML:Class>
<UML:Dependency xmi.id="dep5">
<UML:Dependency.client>
<UML:Class xmi.idref="cl0002"/>
</UML:Dependency.client>
<UML:Dependency.supplier>
<UML:Class xmi.idref="cl0003"/>
</UML:Dependency.supplier>
</UML:Dependency>
</UML:Namespace.ownedElement>
</UML:Model>
</XMI.content>
</XMI>
}}}script
*/
public class XMI0004_Test extends XmiTest {
@Test
void testSimple() throws IOException {
checkXmlAndDescription("(2 entities)");
}
}