Project

General

Profile

« Previous | Next » 

Revision b0f920b4

Added by Andreas Kohlbecker almost 13 years ago

connecting to correct database version

View differences:

cdmlib-ext/src/test/java/eu/etaxonomy/cdm/ext/sru/SruServiceWrapperTest.java
20 20
 */
21 21
public class SruServiceWrapperTest {
22 22
	
23
	static String baseUrl = "http://gso.gbv.de/sru/DB=2.1/";
23
	static String baseUrl = "http://gso.gbv.de/sru/DB=1.83/";
24 24
	
25 25
	public static final Logger logger = Logger.getLogger(SruServiceWrapperTest.class);
26 26

  
......
39 39
// ******************************* TESTS ******************************************************/
40 40

  
41 41
	@Test
42
	@Ignore // ignore web accessing tests
42
	//@Ignore // ignore web accessing tests
43 43
	public void testDoSearchRetrieve(){
44 44
		
45
		List<Reference> refList = sruServiceWrapper.doSearchRetrieve("pica.tit=\"Linnaei Species Plantarum Europae\"", "dc");
45
		List<Reference> refList_1 = sruServiceWrapper.doSearchRetrieve("pica.tit=\"Linnaei Species Plantarum\"", "dc");
46 46
		// -> http://gso.gbv.de/sru/DB=2.1/?version=1.1&operation=searchRetrieve&query=pica.tit%3D%22Species+Plantarum%22&recordSchema=dc
47 47
			
48
		Assert.assertEquals("There should be exactly 2 result for 'Linnaei Species Plantarum Europae'", 2, refList.size());
49
		Reference reference = refList.get(0);
50
		logger.info(reference.toString());
48
		Assert.assertEquals("There should be exactly 5 results for 'Linnaei Species Plantarum'", 5, refList_1.size());
49
		Reference reference_1 = refList_1.get(0);
50
		logger.info(reference_1.toString());
51 51
		//title cache
52
		Assert.assertEquals("Title Cache for Abies albertiana should be 'Linnaei Species Plantarum Europae Pars 2. Supplementum Plantarum Europaearum ...'", "Linnaei Species Plantarum Europae Pars 2. Supplementum Plantarum Europaearum ...", reference.getTitleCache());
52
		Assert.assertEquals("Title of first entry should be 'Caroli Linnaei species plantarum'", "Caroli Linnaei species plantarum", reference_1.getTitleCache());
53 53

  
54
	}	
54
		//--------------------------
55
		
56
		List<Reference> refList_2 = sruServiceWrapper.doSearchRetrieve("pica.all = \"Species+plantarum\" and pica.dst = \"8305\"", "dc");
57
		// -> http://gso.gbv.de/sru/DB=2.1/?version=1.1&operation=searchRetrieve&query=pica.tit%3D%22Species+Plantarum%22&recordSchema=dc
58
			
59
		Assert.assertTrue("There should be at least 1 result for 'species+plantarum' and digitized", refList_2.size() > 0);
60
		Reference reference_2 = refList_2.get(0);
61
		logger.info(reference_2.toString());
62
	}
55 63

  
56 64

  
57 65
}

Also available in: Unified diff