aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGanesh <ganesh.c@samsung.com>2022-07-15 15:07:14 +0530
committerGanesh <ganesh.c@samsung.com>2022-07-15 15:07:22 +0530
commit7d22299faab36bb62dfe1f611e63ecba17440d65 (patch)
treefadf2d1eed1e986e30fb16f5d676b09ccbbb8f32
parentd3936b67d5c34b6c12e3097ea9f930ab8211b1fe (diff)
jira issue, Use assertThat(actual).contains(expected) instead.
Signed-off-by: Ganesh <ganesh.c@samsung.com> Change-Id: I7c485cab044b3b9ade9afc688f2ef67c92ec6ff6 Issue-ID: Issue-ID: SO-3966
-rw-r--r--adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/adapters/catalogdb/catalogrest/QueryServiceArtifactTest.java3
-rw-r--r--adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/adapters/catalogdb/catalogrest/QueryServiceInfoTest.java3
2 files changed, 4 insertions, 2 deletions
diff --git a/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/adapters/catalogdb/catalogrest/QueryServiceArtifactTest.java b/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/adapters/catalogdb/catalogrest/QueryServiceArtifactTest.java
index 2266eafa12..d7852cfdfe 100644
--- a/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/adapters/catalogdb/catalogrest/QueryServiceArtifactTest.java
+++ b/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/adapters/catalogdb/catalogrest/QueryServiceArtifactTest.java
@@ -3,6 +3,7 @@
* ONAP - SO
* ================================================================================
* Copyright (c) 2019, CMCC Technologies Co., Ltd.
+ * 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.
@@ -35,7 +36,7 @@ public class QueryServiceArtifactTest {
QueryServiceArtifact queryServiceArtifact = new QueryServiceArtifact(createList());
String jsonResult = queryServiceArtifact.JSON2(true, false);
Assertions.assertThat(JsonPathUtil.getInstance().locateResult(jsonResult, "$.serviceArtifact[0].name").get())
- .isEqualTo("eMBB.zip");
+ .contains("eMBB.zip");
}
private List<ServiceArtifact> createList() {
diff --git a/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/adapters/catalogdb/catalogrest/QueryServiceInfoTest.java b/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/adapters/catalogdb/catalogrest/QueryServiceInfoTest.java
index e948141b89..37fd4641a1 100644
--- a/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/adapters/catalogdb/catalogrest/QueryServiceInfoTest.java
+++ b/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/adapters/catalogdb/catalogrest/QueryServiceInfoTest.java
@@ -3,6 +3,7 @@
* ONAP - SO
* ================================================================================
* Copyright (c) 2019, CMCC Technologies Co., Ltd.
+ * 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.
@@ -35,7 +36,7 @@ public class QueryServiceInfoTest {
QueryServiceInfo queryServiceInfo = new QueryServiceInfo(createList());
String jsonResult = queryServiceInfo.JSON2(true, false);
String serviceInfo = jsonResult.substring(jsonResult.indexOf("{"), jsonResult.length());
- Assertions.assertThat(JsonPathUtil.getInstance().locateResult(serviceInfo, "$.id").get()).isEqualTo("1");
+ Assertions.assertThat(JsonPathUtil.getInstance().locateResult(serviceInfo, "$.id").get()).contains("1");
}
private List<ServiceInfo> createList() {