aboutsummaryrefslogtreecommitdiffstats
path: root/applications/common/src/test
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2020-03-08 10:41:26 -0400
committerPamela Dragosh <pdragosh@research.att.com>2020-03-09 14:12:45 -0400
commita0ad29cdb6d6f541aac59f9e265f79d3ad085560 (patch)
treee86ea9484f21d56bacf7c7c0d8fd6e85ab3121b3 /applications/common/src/test
parente89d4c2ab8033c9482965f0e2f811e059378d37d (diff)
Updates to support fixed guard policy types
Because the new TOSCA compliant policy types support required fields, we can simplify the guard translator to utilize Match in the target vs the previous complicated Condition usage. Added test coverage to bump above 90% specifically for the guard and coordination code. Added a sonar exclusion for the test module. Issue-ID: POLICY-2244 Change-Id: Ia90d117bd7b86d28a2268fd5ab8315dce7bf0c12 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'applications/common/src/test')
-rw-r--r--applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/ToscaPolicyTranslatorUtilsTest.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/ToscaPolicyTranslatorUtilsTest.java b/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/ToscaPolicyTranslatorUtilsTest.java
index 6fdb8772..8b85a0df 100644
--- a/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/ToscaPolicyTranslatorUtilsTest.java
+++ b/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/ToscaPolicyTranslatorUtilsTest.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,6 +22,7 @@
package org.onap.policy.pdp.xacml.application.common;
+import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.assertTrue;
import java.lang.reflect.Constructor;
@@ -39,4 +40,9 @@ public class ToscaPolicyTranslatorUtilsTest {
}
+ @Test
+ public void testTimeInRange() {
+ assertThat(ToscaPolicyTranslatorUtils.generateTimeInRange("T00:00:00Z", "T08:00:00Z")).isNotNull();
+ }
+
}