diff --git a/datastore_server/sourceTest/java/ch/systemsx/cisd/openbis/dss/generic/server/DatasetDownloadServletTest.java b/datastore_server/sourceTest/java/ch/systemsx/cisd/openbis/dss/generic/server/DatasetDownloadServletTest.java index 5b8f2796e6146f4853d1b3fdcb836e9e8a170bf7..2ddfd0f22b971ec647cfd678efcf93ff5a9e319d 100644 --- a/datastore_server/sourceTest/java/ch/systemsx/cisd/openbis/dss/generic/server/DatasetDownloadServletTest.java +++ b/datastore_server/sourceTest/java/ch/systemsx/cisd/openbis/dss/generic/server/DatasetDownloadServletTest.java @@ -171,9 +171,9 @@ public class DatasetDownloadServletTest assertEquals( "<html><head><title> Data Set Download Service: GROUP-G/PROJECT-P/EPERIMENT-E/SAMPLE-S/1234-1</title><style type=\'text/css\'> * { margin: 3px; }html { height: 100%; }body { height: 100%; font-family: verdana, tahoma, helvetica; font-size: 11px; text-align:left; }h1 { text-align: center; padding: 1em; color: #1E4E8F;}.td_hd { border: 1px solid #FFFFFF; padding 3px; background-color: #DDDDDD; height: 1.5em; }.div_hd { background-color: #1E4E8F; color: white; font-weight: bold; padding: 3px; }table { border-collapse: collapse; padding: 1em; }tr, td { font-family: verdana, tahoma, helvetica; font-size: 11px; }.td_file { font-family: verdana, tahoma, helvetica; font-size: 11px; height: 1.5em }.wrapper { min-height: 100%; height: auto !important; height: 100%; margin: 0em auto -4em; }.footer { height: 4em; text-align: center; }</style></head><body><div class=\'wrapper\'><h1>Data Set Download Service</h1><div class=\'div_hd\'>Information about data set</div><table><tr><td class=\'td_hd\'>Group:</td><td>GROUP-G</td></tr><tr><td class=\'td_hd\'>Project:</td><td>PROJECT-P</td></tr><tr><td class=\'td_hd\'>Experiment:</td><td>EPERIMENT-E</td></tr><tr><td class=\'td_hd\'>Sample:</td><td>SAMPLE-S</td></tr><tr><td class=\'td_hd\'>Data Set Code:</td><td>1234-1</td></tr></table> <div class=\'div_hd\'>Files</div><table> " + OSUtilities.LINE_SEPARATOR - + "<tr><td class=\'td_file\'><a href=\'/download/1234-1/%2B+s+%25+%21+%23+%40\'>+ s % ! # @</td><td></td></tr>" + + "<tr><td class=\'td_file\'><a href=\'/datastore_server/1234-1/%2B+s+%25+%21+%23+%40\'>+ s % ! # @</td><td></td></tr>" + OSUtilities.LINE_SEPARATOR - + "<tr><td class=\'td_file\'><a href=\'/download/1234-1/read+me+%40home.txt\'>read me @home.txt</td><td>12 bytes</td></tr>" + + "<tr><td class=\'td_file\'><a href=\'/datastore_server/1234-1/read+me+%40home.txt\'>read me @home.txt</td><td>12 bytes</td></tr>" + OSUtilities.LINE_SEPARATOR + "</table> </div> <div class=\'footer\'>Copyright © 2008 ETHZ - <a href=\'http://www.cisd.systemsx.ethz.ch/\'>CISD</a> </div> </body></html>" + OSUtilities.LINE_SEPARATOR + "", writer.toString()); @@ -286,7 +286,7 @@ public class DatasetDownloadServletTest assertEquals( "<html><head><title> Data Set Download Service: GROUP-G/PROJECT-P/EPERIMENT-E/SAMPLE-S/1234-1</title><style type=\'text/css\'> * { margin: 3px; }html { height: 100%; }body { height: 100%; font-family: verdana, tahoma, helvetica; font-size: 11px; text-align:left; }h1 { text-align: center; padding: 1em; color: #1E4E8F;}.td_hd { border: 1px solid #FFFFFF; padding 3px; background-color: #DDDDDD; height: 1.5em; }.div_hd { background-color: #1E4E8F; color: white; font-weight: bold; padding: 3px; }table { border-collapse: collapse; padding: 1em; }tr, td { font-family: verdana, tahoma, helvetica; font-size: 11px; }.td_file { font-family: verdana, tahoma, helvetica; font-size: 11px; height: 1.5em }.wrapper { min-height: 100%; height: auto !important; height: 100%; margin: 0em auto -4em; }.footer { height: 4em; text-align: center; }</style></head><body><div class=\'wrapper\'><h1>Data Set Download Service</h1><div class=\'div_hd\'>Information about data set</div><table><tr><td class=\'td_hd\'>Group:</td><td>GROUP-G</td></tr><tr><td class=\'td_hd\'>Project:</td><td>PROJECT-P</td></tr><tr><td class=\'td_hd\'>Experiment:</td><td>EPERIMENT-E</td></tr><tr><td class=\'td_hd\'>Sample:</td><td>SAMPLE-S</td></tr><tr><td class=\'td_hd\'>Data Set Code:</td><td>1234-1</td></tr></table> <div class=\'div_hd\'>Files</div><table> <tr><td class=\'td_hd\'>Folder:</td><td>+ s % ! # @</td></tr>" + OSUtilities.LINE_SEPARATOR - + "<tr><td class=\'td_file\'><a href=\'/download/1234-1/\'>..</td><td></td></tr>" + + "<tr><td class=\'td_file\'><a href=\'/datastore_server/1234-1/\'>..</td><td></td></tr>" + OSUtilities.LINE_SEPARATOR + "</table> </div> <div class=\'footer\'>Copyright © 2008 ETHZ - <a href=\'http://www.cisd.systemsx.ethz.ch/\'>CISD</a> </div> </body></html>" + OSUtilities.LINE_SEPARATOR, writer.toString()); @@ -418,7 +418,7 @@ public class DatasetDownloadServletTest DatasetDownloadServlet servlet = createServlet(); servlet.doGet(request, response); assertEquals("Error:" + OSUtilities.LINE_SEPARATOR - + "Request URI 'blabla' expected to start with '/download/'." + + "Request URI 'blabla' expected to start with '/datastore_server/'." + OSUtilities.LINE_SEPARATOR, writer.toString()); String logContent = getNormalizedLogContent(); assertEquals("The following string does not start as expected: " + logContent, true, diff --git a/datastore_server/sourceTest/java/ch/systemsx/cisd/openbis/dss/generic/server/EncapsulatedOpenBISServiceTest.java b/datastore_server/sourceTest/java/ch/systemsx/cisd/openbis/dss/generic/server/EncapsulatedOpenBISServiceTest.java index cd66135eb0eb84d3575610da6e8cab47cec81ef5..9f5a1ddc0519085a483d614b2b38bb839bf76b13 100644 --- a/datastore_server/sourceTest/java/ch/systemsx/cisd/openbis/dss/generic/server/EncapsulatedOpenBISServiceTest.java +++ b/datastore_server/sourceTest/java/ch/systemsx/cisd/openbis/dss/generic/server/EncapsulatedOpenBISServiceTest.java @@ -60,8 +60,8 @@ public class EncapsulatedOpenBISServiceTest final DataSetInformation dataSetInformation) { exp.one(limsService).authenticate(LIMS_USER, LIMS_PASSWORD); - exp.one(limsService).registerDataStoreServer( - exp.with(Expectations.equal("")), 0, exp.with(Expectations.any(String.class))); + exp.one(limsService).registerDataStoreServer(exp.with(Expectations.equal("")), + exp.with(Expectations.equal(0)), exp.with(Expectations.any(String.class))); exp.one(limsService).tryToGetBaseExperiment("", dataSetInformation.getSampleIdentifier()); } @@ -76,7 +76,7 @@ public class EncapsulatedOpenBISServiceTest one(limsService).authenticate(LIMS_USER, LIMS_PASSWORD); one(limsService).registerDataStoreServer( - with(equal("")), 0, with(any(String.class))); + with(equal("")), with(equal(0)), with(any(String.class))); } }); encapsulatedLimsService =