Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
module Wizardry {
modulepar float mp_componentElapsedTimerMaxDuration
type charstring Wizardry_SimpleDataType
type Wizardry_SimpleDataType TDLinteger
type Wizardry_SimpleDataType string
type record of TDLinteger iCol
function setupTestConfiguration_base ( ) runs on MTC_base system SYSTEM_base {
tester := node.create ;
map ( system : sut_node_interface1 , tester :
interface1_to_sut_node_interface1 ) ;
map ( system : sut_node_interface2 , tester :
interface1_to_sut_node_interface2 ) ;
}
type component MTC_base {
var node tester ;
}
type component SYSTEM_base {
port http sut_node_interface1 ;
port http sut_node_interface2 ;
}
type component node {
timer T_elapsedTimeOfComponent := mp_componentElapsedTimerMaxDuration ;
port http interface1 ;
port http interface2 ;
port http interface1_to_sut_node_interface1 ;
port http interface1_to_sut_node_interface2 ;
port http interface3 ;
}
type port http message {
inout string , TDLinteger , charstring , integer
}
function example ( ) runs on MTC_base {
tester.start ( example_tester_main ( ) ) ;
}
function example_tester_main ( ) runs on node {
interface1_to_sut_node_interface1.send ( "hello" ) ;
interface1_to_sut_node_interface1.send ( 1 ) ;
interface1_to_sut_node_interface1.send ( 1 ) ;
}
testcase tc_example ( ) runs on MTC_base system SYSTEM_base {
setupTestConfiguration_base ( ) ;
example ( ) ;
all component.done ;
}
function exampl ( ) runs on MTC_base {
tester.start ( exampl_tester_main ( ) ) ;
}
function exampl_tester_main ( ) runs on node {
interface1_to_sut_node_interface1.send ( "hello" ) ;
interface1_to_sut_node_interface1.receive ( "hello back" ) ;
}
testcase tc_exampl ( ) runs on MTC_base system SYSTEM_base {
setupTestConfiguration_base ( ) ;
exampl ( ) ;
all component.done ;
}
function exampl2 ( ) runs on MTC_base {
tester.start ( exampl2_tester_main ( ) ) ;
}
function exampl2_tester_main ( ) runs on node {
interface1_to_sut_node_interface1.send ( "hello" ) ;
interface1_to_sut_node_interface1.receive ( "hello back" ) ;
}
testcase tc_exampl2 ( ) runs on MTC_base system SYSTEM_base {
setupTestConfiguration_base ( ) ;
exampl2 ( ) ;
all component.done ;
}
}