Project

General

Profile

« Previous | Next » 

Revision 89dad6a3

Added by Andreas Müller almost 4 years ago

cleanup

View differences:

cdmlib-ext/src/test/java/eu/etaxonomy/cdm/ext/occurrence/bioCase/BioCaseQueryServiceWrapperTest.java
30 30
/**
31 31
 * @author pplitzner
32 32
 * @since 16.09.2013
33
 *
34 33
 */
35 34
public class BioCaseQueryServiceWrapperTest {
36 35

  
......
95 94
        if(UriUtils.isInternetAvailable(null)){
96 95
            BioCaseQueryServiceWrapper service = new BioCaseQueryServiceWrapper();
97 96
            try {
98
                Set<String[]> unitIds = new HashSet<String[]>();
97
                Set<String[]> unitIds = new HashSet<>();
99 98
                String[] unitIdArray ={"B 10 0463639"};
100 99
                unitIds.add(unitIdArray);
101 100
                InputStream queryForSingleUnit = service.query(new OccurenceQuery(unitIds), URI.create("https://ww3.bgbm.org/biocase/pywrapper.cgi?dsa=Herbar"));
......
133 132
                    line = reader.readLine();
134 133
                    count++;
135 134
                } while (line!=null);
136
                unitIds = new HashSet<String[]>();
135
                unitIds = new HashSet<>();
137 136
                String[] unitIdsArray = {"B -W 16385 -00 0"};
138 137
                unitIds.add(unitIdsArray);
139 138
                String[] unitIdsArray2 ={"B 10 0641985"};
......
161 160
                            String recordCount = line.substring(index+recordAttr.length(), index+recordAttr.length()+1);
162 161
                            assertEquals("Incorrect number of occurrences", 2, Integer.parseInt(recordCount));
163 162
                        }
164

  
165

  
166 163
                    }
167 164
                    line = reader.readLine();
168 165
                    count++;
169 166
                } while (line!=null);
170
            } catch (NumberFormatException e) {
171
                fail(e.getMessage());
172
            } catch (ClientProtocolException e) {
173
                fail(e.getMessage());
174
            } catch (IOException e) {
167
            } catch (NumberFormatException | IOException e) {
175 168
                fail(e.getMessage());
176 169
            }
177 170
        } else {

Also available in: Unified diff