diff options
author | Yuli Shlosberg <ys9693@att.com> | 2017-10-19 23:39:36 +0300 |
---|---|---|
committer | Yuli Shlosberg <ys9693@att.com> | 2017-10-22 13:30:52 +0000 |
commit | 968d54ca133fa53a3617fae6ff30e3ff06f1805e (patch) | |
tree | 3292470dc241433e8fce86027d132f34f8223180 /catalog-fe/src | |
parent | c7026576d55cce40fb9928616ab63f5a73663238 (diff) |
add more unit tests remove imports
Change-Id: If2274759f929f595e63d71cc70c374268c019947
Issue-Id: SDC-467
Signed-off-by: Yuli Shlosberg <ys9693@att.com>
(cherry picked from commit b947eb599bfab4599ce1b0c0573b1701c646e429)
Diffstat (limited to 'catalog-fe/src')
4 files changed, 139 insertions, 0 deletions
diff --git a/catalog-fe/src/test/java/org/openecomp/sdc/fe/GzipFilterTest.java b/catalog-fe/src/test/java/org/openecomp/sdc/fe/GzipFilterTest.java new file mode 100644 index 0000000000..b91048dfa1 --- /dev/null +++ b/catalog-fe/src/test/java/org/openecomp/sdc/fe/GzipFilterTest.java @@ -0,0 +1,40 @@ +package org.openecomp.sdc.fe; + +import javax.annotation.Generated; +import javax.servlet.FilterChain; +import javax.servlet.FilterConfig; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; + +import org.junit.Test; + + +public class GzipFilterTest { + + private GzipFilter createTestSubject() { + return new GzipFilter(); + } + + + + + @Test + public void testInit() throws Exception { + GzipFilter testSubject; + FilterConfig filterConfig = null; + + // default test + testSubject = createTestSubject(); + testSubject.init(filterConfig); + } + + + @Test + public void testDestroy() throws Exception { + GzipFilter testSubject; + + // default test + testSubject = createTestSubject(); + testSubject.destroy(); + } +}
\ No newline at end of file diff --git a/catalog-fe/src/test/java/org/openecomp/sdc/fe/client/BackendClientTest.java b/catalog-fe/src/test/java/org/openecomp/sdc/fe/client/BackendClientTest.java new file mode 100644 index 0000000000..d851899f59 --- /dev/null +++ b/catalog-fe/src/test/java/org/openecomp/sdc/fe/client/BackendClientTest.java @@ -0,0 +1,34 @@ +package org.openecomp.sdc.fe.client; + +import java.util.List; + +import javax.annotation.Generated; +import javax.net.ssl.HostnameVerifier; +import javax.ws.rs.container.AsyncResponse; + +import org.apache.http.client.methods.HttpPost; +import org.apache.http.impl.client.CloseableHttpClient; +import org.eclipse.jetty.http.HttpGenerator.ResponseInfo; +import org.junit.Test; +import org.openecomp.sdc.fe.impl.HttpRequestInfo; + + +public class BackendClientTest { + + private BackendClient createTestSubject() { + return new BackendClient("", "", ""); + } + + + @Test + public void testGetHostnameVerifier() throws Exception { + BackendClient testSubject; + HostnameVerifier result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getHostnameVerifier(); + } + + +}
\ No newline at end of file diff --git a/catalog-fe/src/test/java/org/openecomp/sdc/fe/listen/MyObjectMapperProviderTest.java b/catalog-fe/src/test/java/org/openecomp/sdc/fe/listen/MyObjectMapperProviderTest.java new file mode 100644 index 0000000000..a6885bfe1b --- /dev/null +++ b/catalog-fe/src/test/java/org/openecomp/sdc/fe/listen/MyObjectMapperProviderTest.java @@ -0,0 +1,30 @@ +package org.openecomp.sdc.fe.listen; + +import javax.annotation.Generated; + +import org.junit.Test; + +import com.fasterxml.jackson.databind.ObjectMapper; + + +public class MyObjectMapperProviderTest { + + private MyObjectMapperProvider createTestSubject() { + return new MyObjectMapperProvider(); + } + + + @Test + public void testGetContext() throws Exception { + MyObjectMapperProvider testSubject; + Class<?> type = null; + ObjectMapper result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getContext(type); + } + + + +}
\ No newline at end of file diff --git a/catalog-fe/src/test/java/org/openecomp/sdc/fe/servlets/PortalServletTest.java b/catalog-fe/src/test/java/org/openecomp/sdc/fe/servlets/PortalServletTest.java new file mode 100644 index 0000000000..25a7c6962d --- /dev/null +++ b/catalog-fe/src/test/java/org/openecomp/sdc/fe/servlets/PortalServletTest.java @@ -0,0 +1,35 @@ +package org.openecomp.sdc.fe.servlets; + +import java.util.List; + +import javax.annotation.Generated; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.junit.Test; +import org.openecomp.sdc.common.impl.MutableHttpServletRequest; + +import io.netty.handler.codec.http2.Http2FrameReader.Configuration; + + +public class PortalServletTest { + + private PortalServlet createTestSubject() { + return new PortalServlet(); + } + + + @Test + public void testDoGet() throws Exception { + PortalServlet testSubject; + HttpServletRequest request = null; + HttpServletResponse response = null; + + // default test + testSubject = createTestSubject(); + testSubject.doGet(request, response); + } + + + +}
\ No newline at end of file |