aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristof Rabensteiner <christof.rabensteiner@iaik.tugraz.at>2019-10-02 09:43:14 +0200
committerChristof Rabensteiner <christof.rabensteiner@iaik.tugraz.at>2019-10-02 09:43:14 +0200
commit750d845475d36db59ef8b21da68dd0161e0f75ab (patch)
treea4b85d99a8f3ce379c32a3ba3c5bdf39c311b5fb
parent56a9787761c2f48e4f2dba93fa4b0dc97b58adf4 (diff)
downloadmoa-zs-750d845475d36db59ef8b21da68dd0161e0f75ab.tar.gz
moa-zs-750d845475d36db59ef8b21da68dd0161e0f75ab.tar.bz2
moa-zs-750d845475d36db59ef8b21da68dd0161e0f75ab.zip
Add Testcase for Parsing Booleans
-rw-r--r--src/test/java/at/gv/egiz/moazs/ConfigUtilTest.java16
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);