aboutsummaryrefslogtreecommitdiffstats
path: root/sdnr/wt/helpserver
diff options
context:
space:
mode:
Diffstat (limited to 'sdnr/wt/helpserver')
-rw-r--r--sdnr/wt/helpserver/feature/pom.xml4
-rwxr-xr-xsdnr/wt/helpserver/installer/pom.xml2
-rwxr-xr-xsdnr/wt/helpserver/pom.xml2
-rw-r--r--sdnr/wt/helpserver/provider/pom.xml10
-rw-r--r--sdnr/wt/helpserver/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/helpserver/test/TestMyServlet.java25
5 files changed, 17 insertions, 26 deletions
diff --git a/sdnr/wt/helpserver/feature/pom.xml b/sdnr/wt/helpserver/feature/pom.xml
index b5e7dafd8..08f0c63dc 100644
--- a/sdnr/wt/helpserver/feature/pom.xml
+++ b/sdnr/wt/helpserver/feature/pom.xml
@@ -29,7 +29,7 @@
<parent>
<groupId>org.onap.ccsdk.parent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>2.1.0</version>
+ <version>2.1.1-SNAPSHOT</version>
<relativePath/>
</parent>
@@ -41,10 +41,12 @@
<name>ccsdk-features :: ${project.artifactId}</name>
<dependencies>
+
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>sdnr-wt-helpserver-provider</artifactId>
<version>${project.version}</version>
</dependency>
+
</dependencies>
</project>
diff --git a/sdnr/wt/helpserver/installer/pom.xml b/sdnr/wt/helpserver/installer/pom.xml
index 802079c15..654d7406a 100755
--- a/sdnr/wt/helpserver/installer/pom.xml
+++ b/sdnr/wt/helpserver/installer/pom.xml
@@ -29,7 +29,7 @@
<parent>
<groupId>org.onap.ccsdk.parent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>2.1.0</version>
+ <version>2.1.1-SNAPSHOT</version>
<relativePath/>
</parent>
diff --git a/sdnr/wt/helpserver/pom.xml b/sdnr/wt/helpserver/pom.xml
index 3c5d471d6..0fa2c3f7f 100755
--- a/sdnr/wt/helpserver/pom.xml
+++ b/sdnr/wt/helpserver/pom.xml
@@ -29,7 +29,7 @@
<parent>
<groupId>org.onap.ccsdk.parent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>2.1.0</version>
+ <version>2.1.1-SNAPSHOT</version>
<relativePath/>
</parent>
diff --git a/sdnr/wt/helpserver/provider/pom.xml b/sdnr/wt/helpserver/provider/pom.xml
index 5db0853ce..6cf2d03fd 100644
--- a/sdnr/wt/helpserver/provider/pom.xml
+++ b/sdnr/wt/helpserver/provider/pom.xml
@@ -29,7 +29,7 @@
<parent>
<groupId>org.onap.ccsdk.parent</groupId>
<artifactId>binding-parent</artifactId>
- <version>2.1.0</version>
+ <version>2.1.1-SNAPSHOT</version>
<relativePath/>
</parent>
@@ -42,13 +42,17 @@
<properties>
<maven.javadoc.skip>true</maven.javadoc.skip>
- <checkstyle.skip>true</checkstyle.skip>
</properties>
<dependencies>
<dependency>
+ <groupId>org.onap.ccsdk.features.sdnr.wt</groupId>
+ <artifactId>sdnr-wt-common</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
<groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
+ <artifactId>javax.servlet-api</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
diff --git a/sdnr/wt/helpserver/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/helpserver/test/TestMyServlet.java b/sdnr/wt/helpserver/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/helpserver/test/TestMyServlet.java
index cd40e122b..c65002307 100644
--- a/sdnr/wt/helpserver/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/helpserver/test/TestMyServlet.java
+++ b/sdnr/wt/helpserver/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/helpserver/test/TestMyServlet.java
@@ -25,17 +25,16 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import java.io.File;
import java.io.IOException;
-import java.io.StringWriter;
import java.nio.file.Files;
import java.nio.file.OpenOption;
import javax.servlet.ServletException;
-import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;
+import org.onap.ccsdk.features.sdnr.wt.common.test.ServletOutputStreamToStringWriter;
import org.onap.ccsdk.features.sdnr.wt.helpserver.HelpServlet;
import org.onap.ccsdk.features.sdnr.wt.helpserver.data.ExtactBundleResource;
import org.onap.ccsdk.features.sdnr.wt.helpserver.data.HelpInfrastructureObject;
@@ -87,14 +86,7 @@ public class TestMyServlet extends Mockito {
when(request.getRequestURI()).thenReturn("help/");
when(request.getQueryString()).thenReturn("?meta");
- StringWriter stringWriter = new StringWriter();
- ServletOutputStream out = new ServletOutputStream() {
-
- @Override
- public void write(int arg0) throws IOException {
- stringWriter.write(arg0);
- }
- };
+ ServletOutputStreamToStringWriter out = new ServletOutputStreamToStringWriter();
when(response.getOutputStream()).thenReturn(out);
HelpServlet helpServlet = null;
@@ -114,7 +106,7 @@ public class TestMyServlet extends Mockito {
helpServlet.close();
}
- String result = stringWriter.toString().trim();
+ String result = out.getStringWriter().toString().trim();
System.out.println("Result: '" + result + "'");
assertEquals(CONTENT, result);
}
@@ -134,14 +126,7 @@ public class TestMyServlet extends Mockito {
HttpServletResponse response = mock(HttpServletResponse.class);
when(request.getRequestURI()).thenReturn("help/" + fn);
- StringWriter sw = new StringWriter();
- ServletOutputStream out = new ServletOutputStream() {
-
- @Override
- public void write(int arg0) throws IOException {
- sw.write(arg0);
- }
- };
+ ServletOutputStreamToStringWriter out = new ServletOutputStreamToStringWriter();
try {
when(response.getOutputStream()).thenReturn(out);
helpServlet.doGet(request, response);
@@ -157,6 +142,6 @@ public class TestMyServlet extends Mockito {
} catch (Exception e) {
}
- assertEquals("compare content for " + fn, CONTENT, sw.toString().trim());
+ assertEquals("compare content for " + fn, CONTENT, out.getStringWriter().toString().trim());
}
}