Skip to content
Snippets Groups Projects
Commit 29c891a5 authored by Philip Makedonski's avatar Philip Makedonski
Browse files

+ migrated examples from TR

parent aacdea40
No related branches found
No related tags found
No related merge requests found
Package base_configuration {
import all from data;
Configuration {
Interface Type wireless accepts position;
Component Type unit with gate wifi of type wireless;
Test Configuration basic containing
Tester component controller of type unit
SUT component object of type unit
connection between controller.wifi and object.wifi
;
}
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<tdl:Package xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tdl="http://www.etsi.org/spec/TDL/1.4.1" name="base_configuration">
<packagedElement xsi:type="tdl:GateType" name="wireless">
<dataType xsi:type="tdl:StructuredDataType" href="data.tplan2.tdl.tdlan2#//@packagedElement.3"/>
</packagedElement>
<packagedElement xsi:type="tdl:ComponentType" name="unit">
<gateInstance name="wifi" type="//@packagedElement.0"/>
</packagedElement>
<packagedElement xsi:type="tdl:TestConfiguration" name="basic">
<componentInstance name="controller" type="//@packagedElement.1" role="Tester"/>
<componentInstance name="object" type="//@packagedElement.1"/>
<connection>
<endPoint component="//@packagedElement.2/@componentInstance.0" gate="//@packagedElement.1/@gateInstance.0"/>
<endPoint component="//@packagedElement.2/@componentInstance.1" gate="//@packagedElement.1/@gateInstance.0"/>
</connection>
</packagedElement>
<import>
<importedPackage href="data.tplan2.tdl.tdlan2#/"/>
</import>
</tdl:Package>
Package base_configuration {
Import all from data ;
Gate Type wireless accepts position ;
Component Type unit having {
gate wifi of type wireless ;
}
Test Configuration basic {
create Tester controller of type unit ;
create SUT object of type unit ;
connect controller.wifi to object.wifi ;
}
}
\ No newline at end of file
Package data {
Data {
type float;
type position with x of type float, y of type float;
float -22;
float -21;
position startingPosition containing x indicating value -21;
}
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<tdl:Package xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tdl="http://www.etsi.org/spec/TDL/1.4.1" name="data">
<packagedElement xsi:type="tdl:SimpleDataType" name="integer"/>
<packagedElement xsi:type="tdl:SimpleDataType" name="string"/>
<packagedElement xsi:type="tdl:SimpleDataType" name="float"/>
<packagedElement xsi:type="tdl:StructuredDataType" name="position">
<member name="x" dataType="//@packagedElement.2"/>
<member name="y" dataType="//@packagedElement.2"/>
</packagedElement>
<packagedElement xsi:type="tdl:StructuredDataInstance" name="startingPosition" dataType="//@packagedElement.3">
<memberAssignment member="//@packagedElement.3/@member.0">
<comment body="indicating value"/>
<memberSpec xsi:type="tdl:DataInstanceUse" dataInstance="//@packagedElement.6"/>
</memberAssignment>
</packagedElement>
<packagedElement xsi:type="tdl:SimpleDataInstance" name="-22" dataType="//@packagedElement.2"/>
<packagedElement xsi:type="tdl:SimpleDataInstance" name="-21" dataType="//@packagedElement.2"/>
</tdl:Package>
/*
Copyright (c) ETSI 2020.
This software is subject to copyrights owned by ETSI. Non-exclusive permission
is hereby granted, free of charge, to copy, reproduce and amend this file
under the following conditions: It is provided "as is", without warranty of any
kind, expressed or implied.
ETSI shall never be liable for any claim, damages, or other liability arising
from its use or inability of use.This permission does not apply to any documentation
associated with this file for which ETSI keeps all rights reserved. The present
copyright notice shall be included in all copies of whole or part of this
file and shall not imply any sub-license right.
*/
//Converted from data.tplan2 - same model, different representation
Package tdl_data {
Type integer ;
Type string ;
Type float ;
Type position ( x of type float , y of type float ) ;
position startingPosition ( x = -21 ) ;
float -22 ;
float -21 ;
}
\ No newline at end of file
Package data_tables {
Import all from inferred_data;
Import all from inferred_configuration;
inferred_position start_position();
inferred_position open_position();
inferred_position closed_position();
inferred_position end_position();
Action move_to (position of type inferred_position);
Test Description TC_MOVE_TO (
target_position of type inferred_position
) uses configuration inferred_move_object {
Controller.inferred_gate sends parameter target_position to Object.inferred_gate;
perform action move_to (position = parameter target_position) on Object;
}
Test Description TC_MOVE_AROUND uses configuration inferred_move_object {
execute TC_MOVE_TO (target_position = start_position);
execute TC_MOVE_TO (target_position = open_position);
execute TC_MOVE_TO (target_position = closed_position);
execute TC_MOVE_TO (target_position = end_position);
}
}
\ No newline at end of file
Package descriptions {
Import all from inferred_configuration;
Import all from inferred_data;
Action move_to (position of type inferred_position);
Test Description TD_MOVE_OBJECT_LITERAL uses configuration inferred_move_object {
Controller.inferred_gate sends inferred_start_position to Object.inferred_gate;
perform action move_to (position = inferred_start_position) on Object;
}
Test Description TD_MOVE_OBJECT_LITERAL_INLINE uses configuration inferred_move_object {
Controller.inferred_gate sends new inferred_position (x = 22, y = 21) to Object.inferred_gate;
perform action move_to (position = new inferred_position (x = 22, y = 21)) on Object;
}
}
\ No newline at end of file
Package domain {
Domain {
pics :
- MOVABLE
;
entities :
- Object
- Controller
;
events :
- sends
- receives
- moves
- moves_to
;
}
}
\ No newline at end of file
Package inferred_configuration {
Import all from data ;
Gate Type inferred_gate_type accepts position ;
Component Type inferred_component_type having {
gate inferred_gate of type inferred_gate_type ;
}
Test Configuration inferred_move_object {
create Tester Controller of type inferred_component_type ;
create SUT Object of type inferred_component_type ;
connect Controller.inferred_gate to Object.inferred_gate ;
}
}
\ No newline at end of file
Package inferred_data {
Type inferred_simple ;
Type inferred_position ( x of type inferred_simple, y of type inferred_simple) ;
inferred_simple 22 ;
inferred_simple 21 ;
inferred_position inferred_start_position ( x = 22, y = 21 ) ;
}
/*
Copyright (c) ETSI 2020.
This software is subject to copyrights owned by ETSI. Non-exclusive permission
is hereby granted, free of charge, to copy, reproduce and amend this file
under the following conditions: It is provided "as is", without warranty of any
kind, expressed or implied.
ETSI shall never be liable for any claim, damages, or other liability arising
from its use or inability of use.This permission does not apply to any documentation
associated with this file for which ETSI keeps all rights reserved. The present
copyright notice shall be included in all copies of whole or part of this
file and shall not imply any sub-license right.
*/
Package objectives {
import all from domain;
import all from data;
Test Purpose {
TP Id TP_MOVE_OBJECT_LITERAL
Test objective "Move object to destination with literal values."
PICS Selection MOVABLE
Expected behaviour
ensure that {
when {
the Controller entity sends the start position containing
x indicating value 22,
y indicating value 21
;
} then {
the Object entity moves_to the received start position
}
}
}
Test Purpose {
TP Id TP_MOVE_OBJECT_PREDEFINED
Test objective "Move object to destination with predefined values."
Expected behaviour
ensure that {
when {
the Controller entity sends the (predefined) startingPosition containing
x indicating value -22,
y indicating value -21
;
} then {
the Object entity moves_to the (predefined) startingPosition
}
}
}
Test Purpose {
TP Id TP_MOVE_OBJECT_TYPED
Test objective "Move object to destination with typed values."
Expected behaviour
ensure that {
when {
the Controller entity sends the (typed) starting position containing
x indicating value -22,
y indicating value -21
;
} then {
the Object entity moves_to the (typed) starting position
}
}
}
}
\ No newline at end of file
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment