diff options
author | 2024-01-25 14:25:37 +0000 | |
---|---|---|
committer | 2024-02-07 14:59:50 +0000 | |
commit | beeb5e3846c8457987711491bcb58a6567870591 (patch) | |
tree | 227cdd91b00f3889a1109d457f968472cb7ee596 /utils-test/src/test | |
parent | 0241c0aa14447c99fccecc61e91b35051d6743be (diff) |
Remove Dmaap references from policy-common
- updated dependencies for jakarta.* compabilities
- other dependency updates for security fixes
Issue-ID: POLICY-4881
Change-Id: I979d944fcd21279f618d1bcbfe12e914ba30077f
Signed-off-by: rameshiyer27 <ramesh.murugan.iyer@est.tech>
Diffstat (limited to 'utils-test/src/test')
-rw-r--r-- | utils-test/src/test/java/org/onap/policy/common/utils/gson/GsonTestUtilsTest.java | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/utils-test/src/test/java/org/onap/policy/common/utils/gson/GsonTestUtilsTest.java b/utils-test/src/test/java/org/onap/policy/common/utils/gson/GsonTestUtilsTest.java index 9de586d6..51522ec0 100644 --- a/utils-test/src/test/java/org/onap/policy/common/utils/gson/GsonTestUtilsTest.java +++ b/utils-test/src/test/java/org/onap/policy/common/utils/gson/GsonTestUtilsTest.java @@ -3,6 +3,7 @@ * ONAP * ================================================================================ * Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2024 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,8 +36,8 @@ import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import lombok.Getter; +import lombok.Setter; import lombok.ToString; -import org.apache.commons.jexl3.JexlException; import org.junit.Before; import org.junit.Test; @@ -139,11 +140,7 @@ public class GsonTestUtilsTest { data.setText(null); result = utils.applyScripts("use ${obj.text} this", data); assertEquals("use null this", result); - - assertThatThrownBy(() -> utils.applyScripts("use ${obj.text} this", null)) - .isInstanceOf(JsonParseException.class) - .hasCauseInstanceOf(JexlException.class) - .hasMessage("cannot expand element: ${obj.text}"); + assertEquals("use null this", utils.applyScripts("use ${obj.text} this", null)); } @Test @@ -227,25 +224,12 @@ public class GsonTestUtilsTest { assertEquals("[300,{'objE':true,'objEStr':'obj-e-string'},false]".replace('\'', '"'), jsonEl.toString()); } + @Setter + @Getter @ToString public static class Data { private int id; private String text; - public int getId() { - return id; - } - - public void setId(int id) { - this.id = id; - } - - public String getText() { - return text; - } - - public void setText(String text) { - this.text = text; - } } } |