Commit 5b2f6647 authored by urbant's avatar urbant
Browse files

Test cases for 7.6.3, 7.6.4, 7.6.8, 7.8, 7.9 (preATS version)

parent 6cbf7440
Loading
Loading
Loading
Loading
+27 −0
Original line number Diff line number Diff line
/***************************************************
 ** @author   STF 475
 ** @version  0.0.1
 ** @purpose  9:7.6.3, Verify conversion of group reference occurring as child of complex type (sequence, one occurrence)
 ** @verdict  pass accept, ttcn3verdict:pass
***************************************************/
// The following requirements are tested:
// When group reference is a child of complexType, the compositor of the 
// referenced group definition is sequence and both the minOccurs and maxOccurs 
// attributes of the group reference equal to "1" (either explicitly or by
// defaulting to "1"), it shall be translated as if the child elements of the 
// referenced group definition were present in the complexType definition 
// directly
////////////////////////////////////////////////////////////////////////////////

module Pos_070603_referencing_group_components_001 {

   import from schema_Pos_070603_referencing_group_components_001 language "XSD" all;

   template MyType m_msg := {
       shipTo := "New York",
       billTo := "SuperMegaCorp Inc."
   };

//#TC

}
+5 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<ns:MyType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns="schema:Pos_070603_referencing_group_components_001">
 <shipTo>New York</shipTo>
 <billTo>SuperMegaCorp Inc.</billTo>
</ns:MyType>
 No newline at end of file
+16 −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_070603_referencing_group_components_001"
  xmlns:ns="schema:Pos_070603_referencing_group_components_001">
  <group name="shipAndBill">
    <sequence>
      <element name="shipTo" type="string"/>
      <element name="billTo" type="string"/>
    </sequence>
  </group>
  <element name="MyType">
    <complexType>
      <group ref="ns:shipAndBill"/>
    </complexType>
  </element>
</schema>
+28 −0
Original line number Diff line number Diff line
/***************************************************
 ** @author   STF 475
 ** @version  0.0.1
 ** @purpose  9:7.6.3, Verify conversion of group reference occurring inside sequence
 ** @verdict  pass accept, ttcn3verdict:pass
***************************************************/
// The following requirements are tested:
// In all other cases the referenced group component shall be translated to 
// a field of the enclosing record of type (generated for the parent 
// complexType, sequence or choice element) referencing the TTCN-3 type 
// generated for the referenced group definition, considering also the 
// attributes of the referenced group component according to clause 7.1.

module Pos_070603_referencing_group_components_002 {

   import from schema_Pos_070603_referencing_group_components_002 language "XSD" all;

   template MyType m_msg := {
       shipAndBill := {
           shipTo := "Windsor Castle",
           billTo := "Her Majesty"
       },
       sentFrom := "Luxury department"
   };

//#TC

}
+6 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<ns:MyType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns="schema:Pos_070603_referencing_group_components_002">
 <shipTo>Windsor Castle</shipTo>
 <billTo>Her Majesty</billTo>
 <sentFrom>Luxury department</sentFrom>
</ns:MyType>
 No newline at end of file
Loading