Revision 2cb1f0bd
Added by Patrick Plitzner over 9 years ago
- fixed BioCaseServiceWrapperTest
- fixed info log
cdmlib-ext/src/main/java/eu/etaxonomy/cdm/ext/occurrence/bioCase/BioCaseQueryServiceWrapper.java | ||
---|---|---|
68 | 68 |
UrlEncodedFormEntity httpEntity = new UrlEncodedFormEntity(queryParamsPOST); |
69 | 69 |
|
70 | 70 |
if(UriUtils.isServiceAvailable(endPoint, 10000)){ |
71 |
logger.info("Querying BioCASE service with " + endPoint + ", POST: " + httpEntity);
|
|
71 |
logger.info("Querying BioCASE service with " + endPoint + ", POST: " + queryParamsPOST);
|
|
72 | 72 |
//FIXME do the ABCD import here |
73 | 73 |
return executeHttpPost(endPoint, null, httpEntity); |
74 | 74 |
} |
cdmlib-ext/src/test/java/eu/etaxonomy/cdm/ext/occurrence/bioCase/BioCaseQueryServiceWrapperTest.java | ||
---|---|---|
50 | 50 |
System.out.println(line); |
51 | 51 |
String recordAttr = "recordCount=\""; |
52 | 52 |
int index = line.indexOf(recordAttr); |
53 |
if(index<-1){
|
|
53 |
if(index>-1){
|
|
54 | 54 |
String recordCount = line.substring(index+recordAttr.length(), index+recordAttr.length()+1); |
55 | 55 |
assertEquals("Incorrect number of occurrences", 2, Integer.parseInt(recordCount)); |
56 | 56 |
break; |
... | ... | |
82 | 82 |
System.out.println(line); |
83 | 83 |
String recordAttr = "recordCount=\""; |
84 | 84 |
int index = line.indexOf(recordAttr); |
85 |
if(index<-1){
|
|
85 |
if(index>-1){
|
|
86 | 86 |
String recordCount = line.substring(index+recordAttr.length(), index+recordAttr.length()+1); |
87 | 87 |
assertEquals("Incorrect number of occurrences", 1, Integer.parseInt(recordCount)); |
88 | 88 |
} |
89 | 89 |
String unitId = "<abcd:UnitID>"; |
90 | 90 |
int indexId = line.indexOf(unitId); |
91 |
if(indexId<-1){
|
|
91 |
if(indexId>-1){
|
|
92 | 92 |
String id = line.substring(indexId+unitId.length(), indexId+unitId.length()+5); |
93 | 93 |
assertEquals("Incorrect UnitId", 29596, Integer.parseInt(id)); |
94 | 94 |
} |
Also available in: Unified diff