diff options
author | liamfallon <liam.fallon@est.tech> | 2022-04-22 11:10:55 +0100 |
---|---|---|
committer | liamfallon <liam.fallon@est.tech> | 2022-04-22 11:14:32 +0100 |
commit | da53b2e97418e0e4a6522614d86179258de6bf6c (patch) | |
tree | b5abcaee7e58e2eb788867354f86fe504ef8089a | |
parent | fe603562ac2721b00b361f294d5b09b3d4127fde (diff) |
Fix unit test failing due to GSON upgrade
The result returned by the new GSON version has a forward slash at the
end.
Issue-ID: POLICY-4070
Change-Id: I218be9a3d21a78071323ae2127efa74353022800
Signed-off-by: liamfallon <liam.fallon@est.tech>
-rw-r--r-- | utils/src/test/java/org/onap/policy/common/utils/resources/ResourceUtilsTest.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/utils/src/test/java/org/onap/policy/common/utils/resources/ResourceUtilsTest.java b/utils/src/test/java/org/onap/policy/common/utils/resources/ResourceUtilsTest.java index 8b40816e..54e17209 100644 --- a/utils/src/test/java/org/onap/policy/common/utils/resources/ResourceUtilsTest.java +++ b/utils/src/test/java/org/onap/policy/common/utils/resources/ResourceUtilsTest.java @@ -289,7 +289,7 @@ public class ResourceUtilsTest { assertNull(ResourceUtils.getFilePath4Resource(null)); assertEquals("/something/else", ResourceUtils.getFilePath4Resource("/something/else")); assertTrue(ResourceUtils.getFilePath4Resource("xml/example.xml").endsWith("xml/example.xml")); - assertTrue(ResourceUtils.getFilePath4Resource("com/google").endsWith("com/google")); + assertTrue(ResourceUtils.getFilePath4Resource("com/google").contains("com/google")); } @Test @@ -309,7 +309,7 @@ public class ResourceUtilsTest { Set<String> resultD2 = ResourceUtils.getDirectoryContents("org/onap/policy/common/utils/coder"); assertTrue(resultD2.size() >= 15); assertEquals("org/onap/policy/common/utils/coder/CoderExceptionTest.class", - normalizePath(resultD2.iterator().next())); + normalizePath(resultD2.iterator().next())); Set<String> resultJ0 = ResourceUtils.getDirectoryContents("com"); assertTrue(resultJ0.contains("com/google/gson/")); @@ -326,6 +326,7 @@ public class ResourceUtilsTest { /** * Normalizes a path name, replacing OS-specific separators with "/". + * * @param pathName path name to be normalized * @return the normalized path name */ |