Merge branch '1.0.x'

This commit is contained in:
Marcin Grzejszczak
2017-02-08 11:42:12 +01:00
7 changed files with 154 additions and 10 deletions

View File

@@ -39,4 +39,11 @@ enum MatchingType {
* provided regex
*/
REGEX
static boolean regexRelated(MatchingType type) {
if (type == EQUALITY || type == TYPE ) {
return false
}
return true
}
}

View File

@@ -0,0 +1,22 @@
package org.springframework.cloud.contract.spec.internal
import spock.lang.Specification
/**
* @author Marcin Grzejszczak
*/
class MatchingTypeSpec extends Specification {
def "should return [#expected] for type [#type]"() {
expect:
MatchingType.regexRelated(type) == expected
where:
type | expected
MatchingType.EQUALITY | false
MatchingType.TYPE | false
MatchingType.REGEX | true
MatchingType.DATE | true
MatchingType.TIME | true
MatchingType.TIMESTAMP | true
}
}