-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
ConfigurationValueConverterTest.groovy
50 lines (41 loc) · 1.14 KB
/
ConfigurationValueConverterTest.groovy
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
package liquibase.configuration
import spock.lang.Specification
import spock.lang.Unroll
import java.util.logging.Level
class ConfigurationValueConverterTest extends Specification {
@Unroll
def "LOG_LEVEL instance"() {
expect:
ConfigurationValueConverter.LOG_LEVEL.convert(input) == expected
where:
input | expected
"fine" | Level.FINE
"WARNing" | Level.WARNING
"severE" | Level.SEVERE
"oFf" | Level.OFF
"debug" | Level.FINE
"WARN" | Level.WARNING
"error" | Level.SEVERE
null | null
}
@Unroll
def "STRING instance"() {
expect:
ConfigurationValueConverter.STRING.convert(input) == expected
where:
input | expected
null | null
"" | ""
"a string" | "a string"
123 | "123"
}
@Unroll
def "CLASS instance"() {
expect:
ConfigurationValueConverter.CLASS.convert(input) == expected
where:
input | expected
null | null
Integer.getName() | Integer
}
}