summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/test/java
diff options
context:
space:
mode:
authorolegb <olegb@amdocs.com>2018-02-19 16:19:17 +0200
committerVitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com>2018-03-15 08:27:59 +0000
commit9c40f569b817e0886d95ad8b1ac235d8644873da (patch)
tree8613cc536ab0b30b2e96a70d94bdff52944295e7 /openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/test/java
parent5979cf87e450fc2b47360cdfced44808dc2d82bf (diff)
Changed logging context API
Issue-ID: SDC-772 Change-Id: I9dce63f3a1bb7df067cf06a96158afa7d799319e Signed-off-by: olegb <olegb@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/test/java')
-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