summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGanesh <ganesh.c@samsung.com>2022-07-20 18:17:22 +0530
committerGanesh Chandrasekaran <ganesh.c@samsung.com>2022-07-21 01:14:14 +0000
commit0a84775b3486296ed4d883266f3b31494380cc47 (patch)
treecd756db571fb749888f27d4a148896d98330be89
parent7d22299faab36bb62dfe1f611e63ecba17440d65 (diff)
RequestsBean, Jira issue use correc type of Assert
Signed-off-by: Ganesh <ganesh.c@samsung.com> Change-Id: I1a38e7da39ef5062336031c805a4195932a9a786 Issue-ID: SO-3966
-rw-r--r--adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/client/RequestsDbClientTest.java5
-rw-r--r--adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/exceptions/MsoRequestsDbExceptionBeanTest.java4
-rw-r--r--adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/exceptions/MsoRequestsDbExceptionTest.java4
3 files changed, 9 insertions, 4 deletions
diff --git a/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/client/RequestsDbClientTest.java b/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/client/RequestsDbClientTest.java
index 33805f9faa..59919c67f2 100644
--- a/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/client/RequestsDbClientTest.java
+++ b/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/client/RequestsDbClientTest.java
@@ -3,6 +3,7 @@
* ONAP - SO
* ================================================================================
* Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (c) 2022, Samsung Electronics. 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.
@@ -26,7 +27,6 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
import java.sql.Timestamp;
import java.time.Instant;
import java.time.temporal.ChronoUnit;
@@ -339,7 +339,8 @@ public class RequestsDbClientTest extends RequestsAdapterBase {
requestsDbClient.getRequestProcessingDataBySoRequestIdAndNameAndTagOrderByCreateTimeDesc(
"00032ab7-na18-42e5-965d-8ea592502018", "requestAction", "pincFabricConfigRequest");
assertNotNull(requestProcessingData);
- assertTrue(requestProcessingData.size() == 1);
+ assertEquals(1, requestProcessingData.size());
assertEquals("assign", requestProcessingData.get(0).getValue());
}
}
+
diff --git a/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/exceptions/MsoRequestsDbExceptionBeanTest.java b/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/exceptions/MsoRequestsDbExceptionBeanTest.java
index 77821bfefd..3cf9314a8b 100644
--- a/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/exceptions/MsoRequestsDbExceptionBeanTest.java
+++ b/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/exceptions/MsoRequestsDbExceptionBeanTest.java
@@ -3,6 +3,7 @@
* ONAP - SO
* ================================================================================
* Copyright (C) 2018 TechMahindra
+ * Copyright (c) 2022, Samsung Electronics. 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.
@@ -37,7 +38,8 @@ public class MsoRequestsDbExceptionBeanTest {
public void testGetMessage() {
soRequestsDbExceptionBean.setMessage("message");
Assert.assertNotNull(soRequestsDbExceptionBean.getMessage());
- Assert.assertEquals(soRequestsDbExceptionBean.getMessage(), "message");
+ Assert.assertEquals("message", soRequestsDbExceptionBean.getMessage());
}
}
+
diff --git a/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/exceptions/MsoRequestsDbExceptionTest.java b/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/exceptions/MsoRequestsDbExceptionTest.java
index 04f597f9b2..94c6d267e4 100644
--- a/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/exceptions/MsoRequestsDbExceptionTest.java
+++ b/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/exceptions/MsoRequestsDbExceptionTest.java
@@ -3,6 +3,7 @@
* ONAP - SO
* ================================================================================
* Copyright (C) 2018 TechMahindra
+ * Copyright (c) 2022, Samsung Electronics. 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.
@@ -27,7 +28,7 @@ public class MsoRequestsDbExceptionTest {
public void testConstructorWithMessaqge() throws Exception {
String message = "testing message";
MsoRequestsDbException msoRequestsDbException = new MsoRequestsDbException(message);
- Assert.assertTrue(msoRequestsDbException.getCause() == null);
+ Assert.assertNull(msoRequestsDbException.getCause());
Assert.assertEquals(message, msoRequestsDbException.getLocalizedMessage());
Assert.assertEquals(message, msoRequestsDbException.getMessage());
}
@@ -64,3 +65,4 @@ public class MsoRequestsDbExceptionTest {
}
}
+