summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/test')
-rw-r--r--openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/test/java/org/openecomp/sdc/logging/api/LoggingContextTest.java37
1 files changed, 9 insertions, 28 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/test/java/org/openecomp/sdc/logging/api/LoggingContextTest.java b/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/test/java/org/openecomp/sdc/logging/api/LoggingContextTest.java
index 79252cde0b..bfc53a3146 100644
--- a/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/test/java/org/openecomp/sdc/logging/api/LoggingContextTest.java
+++ b/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/test/java/org/openecomp/sdc/logging/api/LoggingContextTest.java
@@ -16,14 +16,12 @@
package org.openecomp.sdc.logging.api;
-import org.testng.annotations.Test;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertTrue;
import java.lang.reflect.Field;
import java.util.concurrent.Callable;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNull;
-import static org.testng.Assert.assertTrue;
+import org.testng.annotations.Test;
/**
* @author EVITALIY
@@ -40,36 +38,19 @@ public class LoggingContextTest {
"org.openecomp.sdc.logging.api.LoggingContext$NoOpLoggingContextService");
}
- @Test
- public void putDoesNotHaveEffectWhenNoBinding() {
- final String key = "Key";
- LoggingContext.put(key, "Dummy");
- assertNull(LoggingContext.get(key));
- }
-
@Test(expectedExceptions = NullPointerException.class)
- public void throwNpeWhenPutWithKeyNull() {
- LoggingContext.put(null, "value");
- }
-
- @Test
- public void getAlwaysReturnsNull() {
- assertNull(LoggingContext.get("GetKey"));
+ public void throwNpeWhenPartnerNameIsNull() {
+ LoggingContext.putPartnerName(null);
}
@Test(expectedExceptions = NullPointerException.class)
- public void throwNpeWhenGetWithKeyNull() {
- LoggingContext.get(null);
- }
-
- @Test
- public void removeDoesNotFail() {
- LoggingContext.remove("RemoveKey");
+ public void throwNpeWhenServiceNameIsNull() {
+ LoggingContext.putServiceName(null);
}
@Test(expectedExceptions = NullPointerException.class)
- public void throwNpWhenRemoveWithKeyNull() {
- LoggingContext.remove(null);
+ public void throwNpeWhenRequestIdIsNull() {
+ LoggingContext.putRequestId(null);
}
@Test