From f9486b50bbf6f92a4549203c1ede21ba912989c0 Mon Sep 17 00:00:00 2001 From: Michael DÜrre Date: Wed, 17 Feb 2021 08:48:52 +0100 Subject: add unit tests for oauth-provider MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit add unit tests and some fixes for oauth provider Issue-ID: CCSDK-3169 Signed-off-by: Michael DÜrre Change-Id: I88c5b2123df7e0c6e49b087c3cc7d24130be5bff --- .../mapperextensions/YangToolsBuilderAnnotationIntrospector.java | 4 ++++ .../org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestAbout.java | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'sdnr/wt/data-provider/provider') diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/mapperextensions/YangToolsBuilderAnnotationIntrospector.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/mapperextensions/YangToolsBuilderAnnotationIntrospector.java index 0a119e0a7..eb611c602 100644 --- a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/mapperextensions/YangToolsBuilderAnnotationIntrospector.java +++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/mapperextensions/YangToolsBuilderAnnotationIntrospector.java @@ -127,4 +127,8 @@ public class YangToolsBuilderAnnotationIntrospector extends JacksonAnnotationInt } + public void addDeserializer(Class clazz, String builder) { + this.customDeserializer.put(clazz, builder); + } + } diff --git a/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestAbout.java b/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestAbout.java index 624451ca7..48e512ad9 100644 --- a/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestAbout.java +++ b/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestAbout.java @@ -32,8 +32,6 @@ import java.nio.file.Files; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; - -import org.jline.utils.Log; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; @@ -111,7 +109,7 @@ public class TestAbout { AboutHelperServlet sv = new AboutHelperServlet(); assertNotNull(sv.getGroupIdOrDefault(null)); } - + private class AboutHelperServlet extends AboutHttpServlet { -- cgit 1.2.3-korg