-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreaderSystem
57 lines (47 loc) · 1.49 KB
/
readerSystem
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
package gotestgen
import "encoding/xml"
// SystemTest is an exported type for System tests
type SystemTest struct {
XMLName xml.Name `xml:"Test"`
TestName string `xml:"Name,attr"`
TestType string `xml:"Type,attr"`
SystemParameters *SystemParameters `xml:"SystemParameters"`
TestCases []*SystemTestCases `xml:"TestCase"`
}
type SystemTestCases struct {
XMLName xml.Name `xml:"TestCase"`
CaseID string `xml:"ID,attr"`
TestValues *SystemTestValues `xml:"InputValues"`
TestOracles *SystemTestOracles `xml:"Oracles"`
}
type SystemTestValues struct {
XMLName xml.Name `xml:"InputValues"`
ConcurrentCalls []*Calls `xml:"Concurrent>Call"`
SequentialCalls []*Calls `xml:"Call"`
}
type Calls struct {
XMLName xml.Name `xml:"Call"`
CallName string `xml:"Name,attr"`
TestValue *TestValue `xml:"InputValue"`
}
type TestValue struct {
XMLName xml.Name `xml:"InputValue"`
Vote Vote `xml:"Vote"`
}
type SystemTestOracles struct {
XMLName xml.Name `xml:"Oracles"`
Decisions []*Decision `xml:"Decision"`
FinalDecision int `xml:"FinalDecision"`
}
type Vote struct {
VoteValue int `xml:"VoteValue"`
WorkerID int `xml:"WorkerID"`
}
type Decision struct {
DecisionValue int `xml:"DecisionValue"`
WorkerID int `xml:"WorkerID"`
}
type SystemParameters struct {
XMLName xml.Name `xml:"SystemParameters"`
NumberOfWorker int `xml:"NumberOfWorker"`
}