diff options
author | Christof Rabensteiner <christof.rabensteiner@iaik.tugraz.at> | 2019-10-02 09:43:14 +0200 |
---|---|---|
committer | Christof Rabensteiner <christof.rabensteiner@iaik.tugraz.at> | 2019-10-02 09:43:14 +0200 |
commit | 750d845475d36db59ef8b21da68dd0161e0f75ab (patch) | |
tree | a4b85d99a8f3ce379c32a3ba3c5bdf39c311b5fb /src/test/java/at/gv/egiz | |
parent | 56a9787761c2f48e4f2dba93fa4b0dc97b58adf4 (diff) | |
download | moa-zs-750d845475d36db59ef8b21da68dd0161e0f75ab.tar.gz moa-zs-750d845475d36db59ef8b21da68dd0161e0f75ab.tar.bz2 moa-zs-750d845475d36db59ef8b21da68dd0161e0f75ab.zip |
Add Testcase for Parsing Booleans
Diffstat (limited to 'src/test/java/at/gv/egiz')
-rw-r--r-- | src/test/java/at/gv/egiz/moazs/ConfigUtilTest.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/java/at/gv/egiz/moazs/ConfigUtilTest.java b/src/test/java/at/gv/egiz/moazs/ConfigUtilTest.java index d7ac0a1..b4398fb 100644 --- a/src/test/java/at/gv/egiz/moazs/ConfigUtilTest.java +++ b/src/test/java/at/gv/egiz/moazs/ConfigUtilTest.java @@ -62,6 +62,22 @@ public class ConfigUtilTest { } + @Test + public void convertBooleanToTrue() { + var prefix = ConfigUtil.TNVZ_REQUEST_KEY; + var map = Map.of(prefix, "true"); + ConfigType config = configUtil.convert(map); + assertThat(config.isPerformQueryPersonRequest()).isTrue(); + } + + @Test + public void convertBooleanToFalse() { + var prefix = ConfigUtil.TNVZ_REQUEST_KEY; + var map = Map.of(prefix, "false"); + ConfigType config = configUtil.convert(map); + assertThat(config.isPerformQueryPersonRequest()).isFalse(); + } + private ConfigType createConfig(Map<String, String> headerMap) { var headers = configUtil.convertMapToHeaders(headerMap); |