From a3c475abddfb091bab547e291e2acf79f4061921 Mon Sep 17 00:00:00 2001 From: ChrisC Date: Fri, 19 Jun 2020 12:08:04 +0200 Subject: Fix Sonar issues Fix assertThat usage and tests Issue-ID: SDC-3116 Signed-off-by: ChrisC Change-Id: Ife533a479096047c4ccb7ae46dfaaa6e2ece974d --- .../openecomp/sdc/be/datamodel/UiComponentDataConverterTest.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'catalog-be/src/test/java/org') diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/datamodel/UiComponentDataConverterTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/datamodel/UiComponentDataConverterTest.java index f9bb2bd892..1b65912e48 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/datamodel/UiComponentDataConverterTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/datamodel/UiComponentDataConverterTest.java @@ -1,5 +1,6 @@ /* * Copyright © 2016-2019 European Support Limited + * Modifications © 2020 AT&T * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -283,7 +284,7 @@ public class UiComponentDataConverterTest { UiComponentDataTransfer uiComponentDataTransfer = uiComponentDataConverter.getUiDataTransferFromResourceByParams(resource, Collections.singletonList("policies")); - assertThat(CollectionUtils.isNotEmpty(uiComponentDataTransfer.getPolicies())); + assertThat(uiComponentDataTransfer.getPolicies()).isNotEmpty(); } @Test @@ -292,7 +293,7 @@ public class UiComponentDataConverterTest { UiComponentDataTransfer uiComponentDataTransfer = uiComponentDataConverter.getUiDataTransferFromResourceByParams(resource, Collections.singletonList("nodeFilter")); - assertThat(MapUtils.isEmpty(uiComponentDataTransfer.getNodeFilter())); + assertThat(uiComponentDataTransfer.getNodeFilter()).isNull(); } @Test @@ -309,7 +310,7 @@ public class UiComponentDataConverterTest { UiComponentDataTransfer uiComponentDataTransfer = uiComponentDataConverter.getUiDataTransferFromResourceByParams(resource, Collections.singletonList("nodeFilter")); - assertThat(MapUtils.isNotEmpty(uiComponentDataTransfer.getNodeFilter())); + assertThat(uiComponentDataTransfer.getNodeFilter()).isNotEmpty(); } private Resource buildResourceWithGroups() { -- cgit 1.2.3-korg