diff options
Diffstat (limited to 'policy-utils/src/test')
3 files changed, 15 insertions, 14 deletions
diff --git a/policy-utils/src/test/java/org/onap/policy/drools/utils/PropertyUtilTest.java b/policy-utils/src/test/java/org/onap/policy/drools/utils/PropertyUtilTest.java index 4b4b9d64..c19adea4 100644 --- a/policy-utils/src/test/java/org/onap/policy/drools/utils/PropertyUtilTest.java +++ b/policy-utils/src/test/java/org/onap/policy/drools/utils/PropertyUtilTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP * ================================================================================ - * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2021 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. @@ -34,8 +34,8 @@ import org.apache.commons.lang3.StringUtils; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; +import org.onap.policy.common.utils.logging.LoggerUtils; import org.onap.policy.common.utils.security.CryptoUtils; -import org.onap.policy.drools.utils.logging.LoggerUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -244,7 +244,7 @@ public class PropertyUtilTest { assertEquals(System.getenv("HOME"), props.getProperty(INTERPOLATION_ENVD)); assertEquals(StringUtils.EMPTY, props.getProperty(INTERPOLATION_ENVD_NONE)); assertEquals(StringUtils.EMPTY, props.getProperty(INTERPOLATION_ENVD_NO_DEFAULT)); - assertEquals(LoggerUtil.ROOT_LOGGER, props.getProperty(INTERPOLATION_CONST)); + assertEquals(LoggerUtils.ROOT_LOGGER, props.getProperty(INTERPOLATION_CONST)); assertEquals(System.getProperty("user.home"), props.getProperty(INTERPOLATION_SYS)); assertEquals(INTERPOLATION_ENVD_DEFAULT_VALUE, props.getProperty(INTERPOLATION_ENVD_DEFAULT)); } diff --git a/policy-utils/src/test/java/org/onap/policy/drools/utils/logging/LoggerUtilTest.java b/policy-utils/src/test/java/org/onap/policy/drools/utils/logging/LoggerUtilTest.java index be1a8a97..195a7add 100644 --- a/policy-utils/src/test/java/org/onap/policy/drools/utils/logging/LoggerUtilTest.java +++ b/policy-utils/src/test/java/org/onap/policy/drools/utils/logging/LoggerUtilTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * policy-utils * ================================================================================ - * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2018, 2021 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. @@ -24,6 +24,7 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import org.junit.Test; +import org.onap.policy.common.utils.logging.LoggerUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -37,20 +38,20 @@ public class LoggerUtilTest { assertTrue(logger.isInfoEnabled()); logger.info("line 1"); - logger.info(LoggerUtil.METRIC_LOG_MARKER, "line 1 Metric"); - logger.info(LoggerUtil.TRANSACTION_LOG_MARKER, "line 1 Transaction"); + logger.info(LoggerUtils.METRIC_LOG_MARKER, "line 1 Metric"); + logger.info(LoggerUtils.TRANSACTION_LOG_MARKER, "line 1 Transaction"); - LoggerUtil.setLevel(LoggerUtil.ROOT_LOGGER, "warn"); + LoggerUtils.setLevel(LoggerUtils.ROOT_LOGGER, "warn"); logger.info("line 2"); - logger.info(LoggerUtil.METRIC_LOG_MARKER, "line 2 Metric"); - logger.info(LoggerUtil.TRANSACTION_LOG_MARKER, "line 2 Transaction"); + logger.info(LoggerUtils.METRIC_LOG_MARKER, "line 2 Metric"); + logger.info(LoggerUtils.TRANSACTION_LOG_MARKER, "line 2 Transaction"); assertFalse(logger.isInfoEnabled()); - LoggerUtil.setLevel(LoggerUtil.ROOT_LOGGER, "debug"); + LoggerUtils.setLevel(LoggerUtils.ROOT_LOGGER, "debug"); logger.debug("line 3"); - logger.debug(LoggerUtil.METRIC_LOG_MARKER, "line 3 Metric"); - logger.debug(LoggerUtil.TRANSACTION_LOG_MARKER, "line 3 Transaction"); + logger.debug(LoggerUtils.METRIC_LOG_MARKER, "line 3 Metric"); + logger.debug(LoggerUtils.TRANSACTION_LOG_MARKER, "line 3 Transaction"); assertTrue(logger.isDebugEnabled()); } diff --git a/policy-utils/src/test/resources/interpolation.properties b/policy-utils/src/test/resources/interpolation.properties index 78ec546b..aeb88a9b 100644 --- a/policy-utils/src/test/resources/interpolation.properties +++ b/policy-utils/src/test/resources/interpolation.properties @@ -2,7 +2,7 @@ # ============LICENSE_START======================================================= # ONAP # ================================================================================ -# Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved. +# Copyright (C) 2019-2021 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. @@ -20,7 +20,7 @@ interpolation.no=no interpolation.env=${env:HOME} -interpolation.const=${const:org.onap.policy.drools.utils.logging.LoggerUtil.ROOT_LOGGER} +interpolation.const=${const:org.onap.policy.common.utils.logging.LoggerUtils.ROOT_LOGGER} interpolation.sys=${sys:user.home} interpolation.envd=${envd:HOME} interpolation.envd.default=${envd:BLAH:default} |