@@ -19,11 +19,11 @@ class HexColorCodeScalarTest extends Specification {
19
19
then :
20
20
result. equals(expectedValue)
21
21
where :
22
- input | expectedValue
23
- " #ff0000" | mkColor(0xff , 0 , 0 )
24
- " #123" | mkColor(0x11 , 0x22 , 0x33 )
25
- " #11223344" | mkColor(0x11 , 0x22 , 0x33 , 0x44 )
26
- " #1234" | mkColor(0x11 , 0x22 , 0x33 , 0x44 )
22
+ input | expectedValue
23
+ " #ff0000" | mkColor(0xff , 0 , 0 )
24
+ " #123" | mkColor(0x11 , 0x22 , 0x33 )
25
+ " #11223344" | mkColor(0x11 , 0x22 , 0x33 , 0x44 )
26
+ " #1234" | mkColor(0x11 , 0x22 , 0x33 , 0x44 )
27
27
}
28
28
29
29
@Unroll
@@ -47,12 +47,12 @@ class HexColorCodeScalarTest extends Specification {
47
47
then :
48
48
result == expectedValue
49
49
where :
50
- input | expectedValue
51
- " #ff0000" | " #ff0000"
52
- " #123" | " #112233"
53
- " #11223344" | " #11223344"
54
- " #1234" | " #11223344"
55
- mkColor(0x21 , 0x23 , 0x33 ) | " #212333"
50
+ input | expectedValue
51
+ " #ff0000" | " #ff0000"
52
+ " #123" | " #112233"
53
+ " #11223344" | " #11223344"
54
+ " #1234" | " #11223344"
55
+ mkColor(0x21 , 0x23 , 0x33 ) | " #212333"
56
56
mkColor(0x21 , 0x23 , 0x33 , 0x44 ) | " #21233344"
57
57
}
58
58
@@ -63,30 +63,30 @@ class HexColorCodeScalarTest extends Specification {
63
63
then :
64
64
result. isEqualTo(expectedValue)
65
65
where :
66
- input | expectedValue
67
- " #ff0000" | new StringValue (" #ff0000" )
68
- " #123" | new StringValue (" #112233" )
69
- " #11223344" | new StringValue (" #11223344" )
70
- " #1234" | new StringValue (" #11223344" )
71
- mkColor(0x21 , 0x23 , 0x33 ) | new StringValue (" #212333" )
66
+ input | expectedValue
67
+ " #ff0000" | new StringValue (" #ff0000" )
68
+ " #123" | new StringValue (" #112233" )
69
+ " #11223344" | new StringValue (" #11223344" )
70
+ " #1234" | new StringValue (" #11223344" )
71
+ mkColor(0x21 , 0x23 , 0x33 ) | new StringValue (" #212333" )
72
72
mkColor(0x21 , 0x23 , 0x33 , 0x44 ) | new StringValue (" #21233344" )
73
73
}
74
74
75
75
@Unroll
76
- def " parseValue throws exception for invalid input #value " () {
76
+ def " parseValue throws exception for invalid input #input " () {
77
77
when :
78
78
def result = coercing. parseValue(input)
79
79
then :
80
80
thrown(CoercingParseValueException )
81
81
where :
82
- input | _
83
- " ff000" | _
84
- " " | _
85
- " not a hex code" | _
86
- " 42.3" | _
87
- new Double (42.3 ) | _
88
- new Float (42.3 ) | _
89
- new Object () | _
82
+ input | _
83
+ " ff000" | _
84
+ " " | _
85
+ " not a hex code" | _
86
+ " 42.3" | _
87
+ Double . valueOf (42.3 ) | _
88
+ Float . valueOf (42.3 ) | _
89
+ new Object () | _
90
90
}
91
91
92
92
}
0 commit comments