File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
src/test/groovy/edu/ie3/datamodel/utils Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -112,7 +112,8 @@ class TryTest extends Specification {
112112
113113 def " A Try object can be creates by a boolean and an exception" () {
114114 when :
115- def actual = Try . ofVoid(bool, ex)
115+ def ex = new FailureException (" failure" )
116+ def actual = Try . ofVoid(bool, () -> ex)
116117
117118 then :
118119 actual. failure == expected
@@ -122,9 +123,9 @@ class TryTest extends Specification {
122123 }
123124
124125 where :
125- bool | ex | expected
126- true | new FailureException ( " failure " ) | true
127- false | new FailureException ( " no failure " ) | false
126+ bool | | expected
127+ true | | true
128+ false || false
128129 }
129130
130131 def " A list of Tries is returned when applying a multiple VoidSupplier to Try#ofVoid()" () {
You can’t perform that action at this time.
0 commit comments