Project

General

Profile

« Previous | Next » 

Revision bac9135c

Added by Katja Luther over 2 years ago

fix #9138: fix test with new unit ids

View differences:

cdmlib-ext/src/test/java/eu/etaxonomy/cdm/ext/occurrence/bioCase/BioCaseQueryServiceWrapperTest.java
22 22

  
23 23
import org.apache.http.client.ClientProtocolException;
24 24
import org.apache.log4j.Logger;
25
import org.junit.Ignore;
26 25
import org.junit.Test;
27 26

  
28 27
import eu.etaxonomy.cdm.common.UriUtils;
......
90 89
    }
91 90

  
92 91
    @Test//(timeout=TIMEOUT)
93
    @Ignore   //preliminary ignored due to #9138, should be reenabled as soon as possible
92
//    @Ignore   //preliminary ignored due to #9138, should be reenabled as soon as possible
94 93
    public void testQueryForUnitId(){
95 94

  
96 95
        if(UriUtils.isInternetAvailable(null)){
97 96
            BioCaseQueryServiceWrapper service = new BioCaseQueryServiceWrapper();
98 97
            try {
98

  
99 99
                Set<String[]> unitIds = new HashSet<>();
100 100
                String[] unitIdArray ={"B 10 0463639"};
101

  
101 102
                unitIds.add(unitIdArray);
102 103
                InputStream queryForSingleUnit = service.query(new OccurenceQuery(unitIds), URI.create("https://ww3.bgbm.org/biocase/pywrapper.cgi?dsa=Herbar"));
103 104

  
......
126 127
                        String unitId = "<abcd:UnitID>";
127 128
                        int indexId = line.indexOf(unitId);
128 129
                        if(indexId>-1){
130
                            @SuppressWarnings("unused")
129 131
                            String id = line.substring(indexId+unitId.length(), indexId+unitId.length()+5);
130 132
                           // assertEquals("Incorrect UnitId", 29596, Integer.parseInt(id));
131 133
                           // break;
......
135 137
                    count++;
136 138
                } while (line!=null);
137 139
                unitIds = new HashSet<>();
138
                String[] unitIdsArray = {"B -W 16385 -00 0"};
140
                String[] unitIdsArray = {"B -W 16385 -01 0"};
139 141
                unitIds.add(unitIdsArray);
140 142
                String[] unitIdsArray2 ={"B 10 0641985"};
141 143
                unitIds.add(unitIdsArray2);
......
174 176
            return;
175 177
        }
176 178
    }
179

  
180

  
177 181
}

Also available in: Unified diff