Loading tools/TTworkbenchSupport/TTworkbenchAdapter/XmlDiffExternalFunction/com/testingtech/tri/extfct/XmlDiffExtFctPlugin.java +4 −4 Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ public class XmlDiffExtFctPlugin extends AnnotationsExternalFunctionPlugin { ((UniversalCharstringValue)xsdFileList.getField(i)).getString(); } } String description = null; String description = ""; boolean res = false; try { XmlDiff diff = new XmlDiff(strReferenceXmlFile, xsdFileArray, null); Loading @@ -37,9 +37,9 @@ public class XmlDiffExtFctPlugin extends AnnotationsExternalFunctionPlugin { } if (!res && description == null) description = "Unspecified error"; if (!res) { p_matchError.setString(description); } return newBooleanValue(res); } } tools/TTworkbenchSupport/TTworkbenchAdapter/taconfig.xml +5 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,11 @@ <parameter id="class" value="com.testingtech.ttcn.rt.tri.ttlibrary.extfct.TTlibraryExtFuncProvider"/> </plugin> </extfunc> <extfunc> <plugin id="com.testingtech.tri.extfct.XmlDiffExtFctPlugin"> <parameter id="class" value="com.testingtech.tri.extfct.XmlDiffExtFctPlugin"/> </plugin> </extfunc> <port> <plugin id="com.testingtech.ttcn.tri.LoopbackPortPlugin"> <parameter id="class" value="com.testingtech.ttcn.tri.LoopbackPortProvider"/> Loading tools/TTworkbenchSupport/TTworkbenchAdapter/ttcn3/Pos_050102_includes_001/Pos_050102_includes_001.ttcn 0 → 100644 +64 −0 Original line number Diff line number Diff line /*************************************************** ** @author STF 475 ** @version 0.0.1 ** @purpose 9:5.1.2, Test inclusion of a schema with the same namespace ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ // The following requirements are tested: // XSD include element information items shall be ignored if the included schema element has the same target // namespace as the including one (implying the absence of the target namespace). module Pos_050102_includes_001 { import from schema_Pos_050102_includes_001 language "XSD" all; template MyType m_msg := 1; type universal charstring Raw; type universal charstring XsdFile; type record of XsdFile XsdFileList; type port P message { inout all; } type component C { port P p; } external function matchFile(Raw p_textToMatch, XsdFile p_referenceXmlFile, XsdFileList p_xsdFileList, out universal charstring p_matchError) return boolean; // external function matchFile(Raw p_textToMatch, charstring p_filePath, out charstring p_matchError) return boolean; testcase TC_Pos_050102_includes_001() runs on C system C { var Raw v_rcv; var charstring v_matchError; map(self:p, system:p); p.send(m_msg); alt { [] p.check(receive(Raw:?) -> value v_rcv) { if (matchFile(v_rcv, "Pos_050102_includes_001.xml", { "Pos_050102_includes_001.xsd", "Pos_050102_includes_001_1.xsd" }, v_matchError)) { alt { [] p.receive(m_msg) { setverdict(pass); } [] p.receive { setverdict(fail, "XML decoding failure"); } } } else { setverdict(fail, v_matchError); } } [] p.receive { setverdict(fail, "Raw decoding failure"); } } } control { execute(TC_Pos_050102_includes_001(), 5.0); } } tools/TTworkbenchSupport/TTworkbenchAdapter/ttcn3/Pos_050102_includes_001/Pos_050102_includes_001.xml 0 → 100644 +2 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <ns1:MyType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="schema:Pos_050102_includes_001">1</ns1:MyType> No newline at end of file tools/TTworkbenchSupport/TTworkbenchAdapter/ttcn3/Pos_050102_includes_001/Pos_050102_includes_001.xsd 0 → 100644 +7 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="UTF-8"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="schema:Pos_050102_includes_001" xmlns:ns1="schema:Pos_050102_includes_001"> <include schemaLocation="Pos_050102_includes_001_1.xsd" /> <element name="MyType2" type="integer"/> </schema> Loading
tools/TTworkbenchSupport/TTworkbenchAdapter/XmlDiffExternalFunction/com/testingtech/tri/extfct/XmlDiffExtFctPlugin.java +4 −4 Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ public class XmlDiffExtFctPlugin extends AnnotationsExternalFunctionPlugin { ((UniversalCharstringValue)xsdFileList.getField(i)).getString(); } } String description = null; String description = ""; boolean res = false; try { XmlDiff diff = new XmlDiff(strReferenceXmlFile, xsdFileArray, null); Loading @@ -37,9 +37,9 @@ public class XmlDiffExtFctPlugin extends AnnotationsExternalFunctionPlugin { } if (!res && description == null) description = "Unspecified error"; if (!res) { p_matchError.setString(description); } return newBooleanValue(res); } }
tools/TTworkbenchSupport/TTworkbenchAdapter/taconfig.xml +5 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,11 @@ <parameter id="class" value="com.testingtech.ttcn.rt.tri.ttlibrary.extfct.TTlibraryExtFuncProvider"/> </plugin> </extfunc> <extfunc> <plugin id="com.testingtech.tri.extfct.XmlDiffExtFctPlugin"> <parameter id="class" value="com.testingtech.tri.extfct.XmlDiffExtFctPlugin"/> </plugin> </extfunc> <port> <plugin id="com.testingtech.ttcn.tri.LoopbackPortPlugin"> <parameter id="class" value="com.testingtech.ttcn.tri.LoopbackPortProvider"/> Loading
tools/TTworkbenchSupport/TTworkbenchAdapter/ttcn3/Pos_050102_includes_001/Pos_050102_includes_001.ttcn 0 → 100644 +64 −0 Original line number Diff line number Diff line /*************************************************** ** @author STF 475 ** @version 0.0.1 ** @purpose 9:5.1.2, Test inclusion of a schema with the same namespace ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ // The following requirements are tested: // XSD include element information items shall be ignored if the included schema element has the same target // namespace as the including one (implying the absence of the target namespace). module Pos_050102_includes_001 { import from schema_Pos_050102_includes_001 language "XSD" all; template MyType m_msg := 1; type universal charstring Raw; type universal charstring XsdFile; type record of XsdFile XsdFileList; type port P message { inout all; } type component C { port P p; } external function matchFile(Raw p_textToMatch, XsdFile p_referenceXmlFile, XsdFileList p_xsdFileList, out universal charstring p_matchError) return boolean; // external function matchFile(Raw p_textToMatch, charstring p_filePath, out charstring p_matchError) return boolean; testcase TC_Pos_050102_includes_001() runs on C system C { var Raw v_rcv; var charstring v_matchError; map(self:p, system:p); p.send(m_msg); alt { [] p.check(receive(Raw:?) -> value v_rcv) { if (matchFile(v_rcv, "Pos_050102_includes_001.xml", { "Pos_050102_includes_001.xsd", "Pos_050102_includes_001_1.xsd" }, v_matchError)) { alt { [] p.receive(m_msg) { setverdict(pass); } [] p.receive { setverdict(fail, "XML decoding failure"); } } } else { setverdict(fail, v_matchError); } } [] p.receive { setverdict(fail, "Raw decoding failure"); } } } control { execute(TC_Pos_050102_includes_001(), 5.0); } }
tools/TTworkbenchSupport/TTworkbenchAdapter/ttcn3/Pos_050102_includes_001/Pos_050102_includes_001.xml 0 → 100644 +2 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <ns1:MyType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="schema:Pos_050102_includes_001">1</ns1:MyType> No newline at end of file
tools/TTworkbenchSupport/TTworkbenchAdapter/ttcn3/Pos_050102_includes_001/Pos_050102_includes_001.xsd 0 → 100644 +7 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="UTF-8"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="schema:Pos_050102_includes_001" xmlns:ns1="schema:Pos_050102_includes_001"> <include schemaLocation="Pos_050102_includes_001_1.xsd" /> <element name="MyType2" type="integer"/> </schema>