Skip to content
Snippets Groups Projects
Commit e7cf7503 authored by tpylak's avatar tpylak
Browse files

LMS-415 unit tests for recursive download service for the CLI

SVN: 6102
parent b8248997
No related branches found
No related tags found
No related merge requests found
...@@ -301,6 +301,7 @@ public class DatasetDownloadServletTest ...@@ -301,6 +301,7 @@ public class DatasetDownloadServletTest
context.checking(new Expectations() context.checking(new Expectations()
{ {
{ {
one(response).setContentType(DatasetDownloadServlet.BINARY_CONTENT_TYPE);
one(response).setContentLength(EXAMPLE_FILE_CONTENT.length()); one(response).setContentLength(EXAMPLE_FILE_CONTENT.length());
one(response).setHeader("Content-Disposition", one(response).setHeader("Content-Disposition",
"inline; filename=" + EXAMPLE_FILE_NAME); "inline; filename=" + EXAMPLE_FILE_NAME);
...@@ -411,7 +412,8 @@ public class DatasetDownloadServletTest ...@@ -411,7 +412,8 @@ public class DatasetDownloadServletTest
DatasetDownloadServlet servlet = createServlet(); DatasetDownloadServlet servlet = createServlet();
servlet.doGet(request, response); servlet.doGet(request, response);
assertEquals("Request URI 'blabla' expected to start with '/download/'." assertEquals("Error:" + OSUtilities.LINE_SEPARATOR
+ "Request URI 'blabla' expected to start with '/download/'."
+ OSUtilities.LINE_SEPARATOR, writer.toString()); + OSUtilities.LINE_SEPARATOR, writer.toString());
String logContent = getNormalizedLogContent(); String logContent = getNormalizedLogContent();
assertEquals("The following string does not start as expected: " + logContent, true, assertEquals("The following string does not start as expected: " + logContent, true,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment