From a0ad29cdb6d6f541aac59f9e265f79d3ad085560 Mon Sep 17 00:00:00 2001 From: Pamela Dragosh Date: Sun, 8 Mar 2020 10:41:26 -0400 Subject: 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 --- .../xacml/application/common/ToscaPolicyTranslatorUtilsTest.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'applications/common/src/test/java/org/onap') 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(); + } + } -- cgit 1.2.3-korg