Commit 83dea760 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

checkstyle with line length and tab

parent 2c649f66
......@@ -434,7 +434,8 @@ public class BuildTestDatabase extends ControllerIntegrationTest {
new BasicNameValuePair("zip-entries[7][_filename]", "layouts/layout-1-pd-SN.txt"),
new BasicNameValuePair("zip-entries[7][_data][name]", "PD substantia nigra"),
new BasicNameValuePair("zip-entries[7][_data][description]",
"Differential transcriptome expression from post mortem tissue. Meta-analysis from 8 published datasets, FDR = 0.05, see PMIDs 23832570 and 25447234."),
"Differential transcriptome expression from post mortem tissue. "
+ "Meta-analysis from 8 published datasets, FDR = 0.05, see PMIDs 23832570 and 25447234."),
new BasicNameValuePair("zip-entries[8][_type]", "MAP"),
new BasicNameValuePair("zip-entries[8][_filename]", "MainMap.xml"),
new BasicNameValuePair("zip-entries[8][_data][root]", "true"),
......@@ -517,14 +518,17 @@ public class BuildTestDatabase extends ControllerIntegrationTest {
"INSERT INTO PRIVILEGE_TABLE VALUES(173,'empty','WRITE_PROJECT')",
"INSERT INTO PRIVILEGE_TABLE VALUES(174,'*','WRITE_PROJECT')",
"INSERT INTO PRIVILEGE_TABLE VALUES(175,'*','READ_PROJECT')",
"INSERT INTO PROJECT_TABLE VALUES(4,'empty',100.0E0,'a2e4822a98337283e39f7b60acf85ec9',NULL,NULL,NULL,FALSE,'empty DISEASE MAP',NULL,NULL,'DONE',NULL,'OPEN_LAYERS','2014-03-27 15:59:31.321000',1)",
"INSERT INTO PROJECT_TABLE VALUES(4,'empty',100.0E0,'a2e4822a98337283e39f7b60acf85ec9',"
+ "NULL,NULL,NULL,FALSE,'empty DISEASE MAP',NULL,NULL,'DONE',NULL,'OPEN_LAYERS','2014-03-27 15:59:31.321000',1)",
"INSERT INTO USER_PRIVILEGE_MAP_TABLE VALUES(1,169)",
"INSERT INTO USER_PRIVILEGE_MAP_TABLE VALUES(1,170)",
"INSERT INTO USER_PRIVILEGE_MAP_TABLE VALUES(1,172)",
"INSERT INTO USER_PRIVILEGE_MAP_TABLE VALUES(1,173)",
"INSERT INTO USER_PRIVILEGE_MAP_TABLE VALUES(3,172)",
"INSERT INTO USER_TABLE VALUES(1,'$2a$10$AGem45sdWGs2xJ1sU.J3eOcaLwvLIIm3.D9DbRY2T0vUpyouNw8iW',NULL,'admin',NULL,NULL,FALSE,NULL,NULL,NULL,NULL,FALSE,NULL,FALSE)",
"INSERT INTO USER_TABLE VALUES(3,'$2a$10$gyuDgRZ1wwuFe67DHnkMruhOCKJp1KBzQLeQSJ57WAehJXmhkreRi',NULL,'anonymous',NULL,NULL,FALSE,NULL,NULL,NULL,NULL,FALSE,NULL,FALSE)"
"INSERT INTO USER_TABLE VALUES(1,'$2a$10$AGem45sdWGs2xJ1sU.J3eOcaLwvLIIm3.D9DbRY2T0vUpyouNw8iW',"
+ "NULL,'admin',NULL,NULL,FALSE,NULL,NULL,NULL,NULL,FALSE,NULL,FALSE)",
"INSERT INTO USER_TABLE VALUES(3,'$2a$10$gyuDgRZ1wwuFe67DHnkMruhOCKJp1KBzQLeQSJ57WAehJXmhkreRi',"
+ "NULL,'anonymous',NULL,NULL,FALSE,NULL,NULL,NULL,NULL,FALSE,NULL,FALSE)"
);
StringBuilder result = new StringBuilder("SET DATABASE REFERENTIAL INTEGRITY FALSE;\n");
......
......@@ -143,7 +143,8 @@ public class GenomicsControllerIntegrationTest extends ControllerIntegrationTest
.andDo(document("genomics/get_genome_versions",
pathParameters(
parameterWithName("taxonomyId").description("organism taxonomy id"),
parameterWithName("genomeType").description("genome type, acceptable values: " + snippets.getOptionsAsString(ReferenceGenomeType.class))),
parameterWithName("genomeType").description("genome type, acceptable values: " +
snippets.getOptionsAsString(ReferenceGenomeType.class))),
responseFields(
fieldWithPath("[]")
.description("list of genome versions")
......@@ -171,7 +172,8 @@ public class GenomicsControllerIntegrationTest extends ControllerIntegrationTest
.andDo(document("genomics/get_genome_remote_url",
pathParameters(
parameterWithName("taxonomyId").description("organism taxonomy id"),
parameterWithName("genomeType").description("genome type, acceptable values: " + snippets.getOptionsAsString(ReferenceGenomeType.class)),
parameterWithName("genomeType").description("genome type, acceptable values: " +
snippets.getOptionsAsString(ReferenceGenomeType.class)),
parameterWithName("version").description("genome version")),
responseFields(
fieldWithPath("[]")
......@@ -277,7 +279,8 @@ public class GenomicsControllerIntegrationTest extends ControllerIntegrationTest
.andDo(document("genomics/get_genome_information",
pathParameters(
parameterWithName("taxonomyId").description("organism taxonomy id"),
parameterWithName("genomeType").description("genome type, acceptable values: " + snippets.getOptionsAsString(ReferenceGenomeType.class)),
parameterWithName("genomeType").description("genome type, acceptable values: " +
snippets.getOptionsAsString(ReferenceGenomeType.class)),
parameterWithName("version").description("genome version")),
responseFields(genomeInformationResponseFields())))
.andExpect(status().is2xxSuccessful());
......
......@@ -70,6 +70,13 @@ public class ProjectControllerIntegrationTest extends ControllerIntegrationTest
private static final String CURATOR_LOGIN = "test_user";
private static final String TEST_PROJECT_2 = "test_project2";
private static final String INVALID_LONG_ID = "aaaaaaaaxvncnbvscbnmcnbmccbnsbnsdsnbmdsvbnm"
+ "sdvnbmsdbmnbndvmsbnmsvdnbmnmbdsvnbmdsvxncbmbnmscbnzdnbnabnsbnamsdbmnsadbmnasdbnmnbm"
+ "sadbnmasdnbasdbnmsadnbnbmsadbnmadsnbmadsnbnbsadnbmadsbnndsabnbmdasbnmdsajqwrhgjrwhj"
+ "ghgjwerghjwreghwewnjnnbbbnbnbmbnbnzcmnnbmzcnmbcsbnmcsnbcnbzmnbczxnbmczxnbmcxznbcnxb"
+ "mznbmxzcnbzcxnnbcxznbmzcnbczxnbmnbzcxnbmcznnczbnbzcnbmzcbnmbncznbcznbcz";
Logger logger = LogManager.getLogger();
@Autowired
private IUserService userService;
......@@ -736,7 +743,6 @@ public class ProjectControllerIntegrationTest extends ControllerIntegrationTest
new String(Files.readAllBytes(Paths.get("./src/test/resources/generic.xml")), "UTF-8"),
admin);
try {
String invalidId = "aaaaaaaaxvncnbvscbnmcnbmccbnsbnsdsnbmdsvbnmsdvnbmsdbmnbndvmsbnmsvdnbmnmbdsvnbmdsvxncbmbnmscbnzdnbnabnsbnamsdbmnsadbmnasdbnmnbmsadbnmasdnbasdbnmsadnbnbmsadbnmadsnbmadsnbnbsadnbmadsbnndsabnbmdasbnmdsajqwrhgjrwhjghgjwerghjwreghwewnjnnbbbnbnbmbnbnzcmnnbmzcnmbcsbnmcsnbcnbzmnbczxnbmczxnbmcxznbcnxbmznbmxzcnbzcxnnbcxznbmzcnbczxnbmnbzcxnbmcznnczbnbzcnbmzcbnmbncznbcznbcz";
String body = EntityUtils.toString(new UrlEncodedFormEntity(Arrays.asList(
new BasicNameValuePair("file-id", String.valueOf(fileEntry.getId())),
......@@ -744,7 +750,7 @@ public class ProjectControllerIntegrationTest extends ControllerIntegrationTest
new BasicNameValuePair("parser",
"lcsb.mapviewer.converter.model.celldesigner.CellDesignerXmlParser"))));
RequestBuilder request = post("/api/projects/" + invalidId)
RequestBuilder request = post("/api/projects/{projectId}", INVALID_LONG_ID)
.contentType(MediaType.APPLICATION_FORM_URLENCODED)
.content(body)
.session(createSession(BUILT_IN_TEST_ADMIN_LOGIN, BUILT_IN_TEST_ADMIN_PASSWORD));
......@@ -763,12 +769,10 @@ public class ProjectControllerIntegrationTest extends ControllerIntegrationTest
new String(Files.readAllBytes(Paths.get("./src/test/resources/generic.xml")), "UTF-8"),
admin);
try {
String invalidName = "aaaaaaaaxvncnbvscbnmcnbmccbnsbnsdsnbmdsvbnmsdvnbmsdbmnbndvmsbnmsvdnbmnmbdsvnbmdsvxncbmbnmscbnzdnbnabnsbnamsdbmnsadbmnasdbnmnbmsadbnmasdnbasdbnmsadnbnbmsadbnmadsnbmadsnbnbsadnbmadsbnndsabnbmdasbnmdsajqwrhgjrwhjghgjwerghjwreghwewnjnnbbbnbnbmbnbnzcmnnbmzcnmbcsbnmcsnbcnbzmnbczxnbmczxnbmcxznbcnxbmznbmxzcnbzcxnnbcxznbmzcnbczxnbmnbzcxnbmcznnczbnbzcnbmzcbnmbncznbcznbcz";
String body = EntityUtils.toString(new UrlEncodedFormEntity(Arrays.asList(
new BasicNameValuePair("file-id", String.valueOf(fileEntry.getId())),
new BasicNameValuePair("mapCanvasType", "OPEN_LAYERS"),
new BasicNameValuePair("name", invalidName),
new BasicNameValuePair("name", INVALID_LONG_ID),
new BasicNameValuePair("parser", "lcsb.mapviewer.converter.model.celldesigner.CellDesignerXmlParser"))));
RequestBuilder request = post("/api/projects/" + TEST_PROJECT)
......@@ -814,11 +818,10 @@ public class ProjectControllerIntegrationTest extends ControllerIntegrationTest
@Test
public void modifyProjectWithTooLongName() throws Exception {
createProjectInSeparateThread(TEST_PROJECT);
String invalidName = "aaaaaaaaxvncnbvscbnmcnbmccbnsbnsdsnbmdsvbnmsdvnbmsdbmnbndvmsbnmsvdnbmnmbdsvnbmdsvxncbmbnmscbnzdnbnabnsbnamsdbmnsadbmnasdbnmnbmsadbnmasdnbasdbnmsadnbnbmsadbnmadsnbmadsnbnbsadnbmadsbnndsabnbmdasbnmdsajqwrhgjrwhjghgjwerghjwreghwewnjnnbbbnbnbmbnbnzcmnnbmzcnmbcsbnmcsnbcnbzmnbczxnbmczxnbmcxznbcnxbmznbmxzcnbzcxnnbcxznbmzcnbczxnbmnbzcxnbmcznnczbnbzcnbmzcbnmbncznbcznbcz";
String content = "{\"project\":{\"name\":\"" + invalidName + "\"}}";
String content = "{\"project\":{\"name\":\"" + INVALID_LONG_ID + "\"}}";
RequestBuilder request = patch("/api/projects/" + TEST_PROJECT + "/")
RequestBuilder request = patch("/api/projects/{projectId}/", TEST_PROJECT)
.contentType(MediaType.APPLICATION_JSON)
.content(content)
.session(createSession(BUILT_IN_TEST_ADMIN_LOGIN, BUILT_IN_TEST_ADMIN_PASSWORD));
......
......@@ -1180,7 +1180,8 @@ public class UserControllerIntegrationTest extends ControllerIntegrationTest {
.type(JsonFieldType.OBJECT),
fieldWithPath(prefix + "element-annotators['*']")
.description(
"list of annotators used for specific BioEntity type. Type of BioEntity is a class name that represents specific type in the system, for example: "
"list of annotators used for specific BioEntity type. "
+ "Type of BioEntity is a class name that represents specific type in the system, for example: "
+ BioEntity.class.getName() + ", " + Complex.class.getName())
.type(JsonFieldType.ARRAY),
fieldWithPath(prefix + "element-annotators['*'][].id")
......@@ -1232,7 +1233,8 @@ public class UserControllerIntegrationTest extends ControllerIntegrationTest {
.type(JsonFieldType.STRING),
fieldWithPath(prefix + "element-annotators['*'][].parameters[].order")
.description(
"input parameters are checked in order. First match identifies the element. This field defines what is the order of INPUT parameters.")
"input parameters are checked in order. First match identifies the element. "
+ "This field defines what is the order of INPUT parameters.")
.optional()
.type(JsonFieldType.NUMBER)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment