forked from OpenBankProject/OBP-API
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApiVersionUtilsTest.scala
More file actions
25 lines (19 loc) · 872 Bytes
/
ApiVersionUtilsTest.scala
File metadata and controls
25 lines (19 loc) · 872 Bytes
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
package code.util
import code.api.util.ApiVersionUtils
import code.api.util.ApiVersionUtils.versions
import code.api.v4_0_0.V400ServerSetup
class ApiVersionUtilsTest extends V400ServerSetup {
feature("test ApiVersionUtils.valueOf ") {
scenario("support both fullyQualifiedVersion and apiShortVersion") {
ApiVersionUtils.valueOf("v4.0.0")
ApiVersionUtils.valueOf("OBPv4.0.0")
ApiVersionUtils.valueOf("v1.3")
ApiVersionUtils.valueOf("BGv1.3")
ApiVersionUtils.valueOf("dynamic-endpoint")
ApiVersionUtils.valueOf("dynamic-entity")
versions.map(version => ApiVersionUtils.valueOf(version.apiShortVersion))
versions.map(version => ApiVersionUtils.valueOf(version.fullyQualifiedVersion))
//NOTE, when we added the new version, better fix this number manually. and also check the versions
versions.length shouldBe(25)
}}
}