Code Review
/
policy
/
engine.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "Unit/SONAR/Checkstyle in ONAP-REST"
[policy/engine.git]
/
ONAP-XACML
/
src
/
test
/
java
/
org
/
onap
/
policy
/
xacml
/
test
/
std
/
pap
/
StdPDPPIPConfigTest.java
diff --git
a/ONAP-XACML/src/test/java/org/onap/policy/xacml/test/std/pap/StdPDPPIPConfigTest.java
b/ONAP-XACML/src/test/java/org/onap/policy/xacml/test/std/pap/StdPDPPIPConfigTest.java
index
b5713d3
..
746aace
100644
(file)
--- a/
ONAP-XACML/src/test/java/org/onap/policy/xacml/test/std/pap/StdPDPPIPConfigTest.java
+++ b/
ONAP-XACML/src/test/java/org/onap/policy/xacml/test/std/pap/StdPDPPIPConfigTest.java
@@
-2,7
+2,7
@@
* ============LICENSE_START=======================================================
* ONAP-XACML
* ================================================================================
* ============LICENSE_START=======================================================
* ONAP-XACML
* ================================================================================
- * Copyright (C) 2017-201
8
AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-201
9
AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Modifications Copyright (C) 2019 Samsung
* ================================================================================
* ================================================================================
* Modifications Copyright (C) 2019 Samsung
* ================================================================================
@@
-22,14
+22,17
@@
package org.onap.policy.xacml.test.std.pap;
package org.onap.policy.xacml.test.std.pap;
+import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.not;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertThat;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.not;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertThat;
+
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
+
import org.junit.Test;
import org.onap.policy.xacml.std.pap.StdPDPPIPConfig;
import org.junit.Test;
import org.onap.policy.xacml.std.pap.StdPDPPIPConfig;
@@
-41,6
+44,8
@@
public class StdPDPPIPConfigTest {
String value = "testVal";
Properties props = new Properties();
props.setProperty(id + ".classname", value);
String value = "testVal";
Properties props = new Properties();
props.setProperty(id + ".classname", value);
+ props.setProperty(id + ".dontcare", "blah");
+ props.setProperty("foo", "bar");
Map<String, String> map = new HashMap<String, String>();
map.put(id, value);
Map<String, String> map = new HashMap<String, String>();
map.put(id, value);
@@
-106,4
+111,13
@@
public class StdPDPPIPConfigTest {
// Test toString
assertThat(config.toString().length(), is(not(0)));
}
// Test toString
assertThat(config.toString().length(), is(not(0)));
}
+
+ @Test
+ public void testBadProperties() {
+ Properties props = new Properties();
+ props.setProperty("foo", "bar");
+ assertThatExceptionOfType(IllegalArgumentException.class).isThrownBy(() -> {
+ new StdPDPPIPConfig("myid", props);
+ });
+ }
}
}