File tree Expand file tree Collapse file tree 1 file changed +55
-28
lines changed
src/test/groovy/edu/ie3/datamodel/io/factory/input Expand file tree Collapse file tree 1 file changed +55
-28
lines changed Original file line number Diff line number Diff line change @@ -28,41 +28,68 @@ class EmInputFactoryTest extends Specification {
28
28
def " An EmInputFactory should return the valid fields correctly" () {
29
29
given :
30
30
def inputFactory = new EmInputFactory ()
31
-
32
- def requiredFields = [
33
- " uuid" ,
34
- " id" ,
35
- " controlStrategy" ,
36
- " controllingEm"
37
- ] as Set
38
-
39
- def operationCombinations = [
40
- [" operatesFrom" ],
41
- [" operatesUntil" ],
31
+ def validCombinations = [
42
32
[
43
- " operatesFrom" ,
33
+ " uuid" ,
34
+ " id" ,
35
+ " controlStrategy" ,
36
+ " controllingEm"
37
+ ],
38
+ [
39
+ " uuid" ,
40
+ " id" ,
41
+ " controlStrategy" ,
42
+ " controllingEm" ,
43
+ " operatesFrom"
44
+ ],
45
+ [
46
+ " uuid" ,
47
+ " id" ,
48
+ " controlStrategy" ,
49
+ " controllingEm" ,
44
50
" operatesUntil"
45
51
],
46
- [" operator" ],
47
- [" operatesFrom" , " operator" ],
48
- [" operatesUntil" , " operator" ],
49
52
[
53
+ " uuid" ,
54
+ " id" ,
55
+ " controlStrategy" ,
56
+ " controllingEm" ,
50
57
" operatesFrom" ,
51
- " operatesUntil" ,
58
+ " operatesUntil"
59
+ ],
60
+ [
61
+ " uuid" ,
62
+ " id" ,
63
+ " controlStrategy" ,
64
+ " controllingEm" ,
52
65
" operator"
66
+ ],
67
+ [
68
+ " uuid" ,
69
+ " id" ,
70
+ " controlStrategy" ,
71
+ " controllingEm" ,
72
+ " operator" ,
73
+ " operatesFrom"
74
+ ],
75
+ [
76
+ " uuid" ,
77
+ " id" ,
78
+ " controlStrategy" ,
79
+ " controllingEm" ,
80
+ " operator" ,
81
+ " operatesUntil"
82
+ ],
83
+ [
84
+ " uuid" ,
85
+ " id" ,
86
+ " controlStrategy" ,
87
+ " controllingEm" ,
88
+ " operator" ,
89
+ " operatesFrom" ,
90
+ " operatesUntil"
53
91
]
54
- ]
55
-
56
- def validCombinations = [
57
- requiredFields,
58
- requiredFields + operationCombinations. get(0 ),
59
- requiredFields + operationCombinations. get(1 ),
60
- requiredFields + operationCombinations. get(2 ),
61
- requiredFields + operationCombinations. get(3 ),
62
- requiredFields + operationCombinations. get(4 ),
63
- requiredFields + operationCombinations. get(5 ),
64
- requiredFields + operationCombinations. get(6 ),
65
- ]
92
+ ]. collect { it as Set }
66
93
67
94
when :
68
95
def fieldCombinations = inputFactory. getFields(EmInput )
You can’t perform that action at this time.
0 commit comments