aboutsummaryrefslogtreecommitdiffstats
path: root/common-app-logging/src/test/java/org/openecomp
diff options
context:
space:
mode:
authorvasraz <vasyl.razinkov@est.tech>2021-02-19 19:04:13 +0000
committerChristophe Closset <christophe.closset@intl.att.com>2021-02-20 07:46:00 +0000
commitdb65955fc93a81911ef66ab88b380dc1a5926dce (patch)
treedbc27f8b2b5cd72fbb825288dc0c4a4ade3d1ad9 /common-app-logging/src/test/java/org/openecomp
parentd6992c860be02a4c88b8f49234d8ee7e117dd60a (diff)
Fix BLOCKER BUGs reported by Sonar
Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech> Change-Id: I00c466ac3fcbe8fab4629aed3a36bb2d8af3a970 Issue-ID: SDC-3472
Diffstat (limited to 'common-app-logging/src/test/java/org/openecomp')
-rw-r--r--common-app-logging/src/test/java/org/openecomp/sdc/common/log/elements/LoggerFactoryTest.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/common-app-logging/src/test/java/org/openecomp/sdc/common/log/elements/LoggerFactoryTest.java b/common-app-logging/src/test/java/org/openecomp/sdc/common/log/elements/LoggerFactoryTest.java
index 0de4d9c045..9a8b7ca7bb 100644
--- a/common-app-logging/src/test/java/org/openecomp/sdc/common/log/elements/LoggerFactoryTest.java
+++ b/common-app-logging/src/test/java/org/openecomp/sdc/common/log/elements/LoggerFactoryTest.java
@@ -24,16 +24,19 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Mock;
+import org.mockito.junit.jupiter.MockitoExtension;
import org.slf4j.Logger;
-public class LoggerFactoryTest {
+@ExtendWith(MockitoExtension.class)
+class LoggerFactoryTest {
@Mock
private Logger logger;
@Test
- public void getMdcLoggerInstantiateProperly() {
+ void getMdcLoggerInstantiateProperly() {
assertNotNull(LoggerFactory.getMdcLogger(LoggerAudit.class, logger));
assertNotNull(LoggerFactory.getMdcLogger(LoggerDebug.class, logger));
assertNotNull(LoggerFactory.getMdcLogger(LoggerMetric.class, logger));
@@ -42,7 +45,7 @@ public class LoggerFactoryTest {
}
@Test
- public void getLoggerInstantiateProperly() {
+ void getLoggerInstantiateProperly() {
assertNotNull(LoggerFactory.getLogger(LoggerAudit.class, logger));
assertNotNull(LoggerFactory.getLogger(LoggerDebug.class, logger));
assertNotNull(LoggerFactory.getLogger(LoggerMetric.class, logger));
@@ -50,12 +53,12 @@ public class LoggerFactoryTest {
}
@Test
- public void getMdcLoggerReturnsNullForSomeInvalidClasses() {
+ void getMdcLoggerReturnsNullForSomeInvalidClasses() {
assertNull(LoggerFactory.getMdcLogger(Integer.class, logger));
}
@Test
- public void getLoggerReturnsNullForSomeInvalidClasses() {
+ void getLoggerReturnsNullForSomeInvalidClasses() {
assertNull(LoggerFactory.getLogger(Integer.class, logger));
}