Created
October 29, 2014 17:31
-
-
Save curtisallen/ac68029c4f8d328b0632 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DefaultUtilsSpecTest extends Specification { | |
@Unroll | |
def "test defaults (#a #b #c) = #d"(String a, String b, String c, String d){ | |
expect: | |
DefaultUtils.defaultIfNull(a, b, c) == d | |
where: | |
a | b | c | d | |
"val1" | null | "default" | "val1" | |
null | "val2"| "default" | "val2" | |
null | null | "default" | "default" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment