Project

General

Profile

« Previous | Next » 

Revision 51855

testing indexing of software

View differences:

modules/dnet-openaireplus-workflows/trunk/src/test/java/eu/dnetlib/msro/openaireplus/api/objects/ResultEntryTest.java
53 53
			public Object answer(final InvocationOnMock invocation) throws Throwable {
54 54
				final String query = invocation.getArguments()[0].toString();
55 55
				if (query.contains("dnet:result_typologies")) {
56
					return Arrays.asList("publication @@@ publication", "dataset @@@ dataset");
56
					return Arrays.asList("publication @@@ publication", "dataset @@@ dataset", "software @@@ software");
57 57
				} else if (query.contains("dnet:access_modes")) {
58 58
					return Arrays.asList("OPEN @@@ Open Access");
59 59
				} else if (query.contains("dnet:publication_resource")) {
......
69 69
							"egi::classification::natsc::math @@@ Mathematics",
70 70
							"egi::classification::natsc @@@ Natural Sciences",
71 71
							"egi::classification @@@ EGI classification scheme",
72
							"egi @@@ EGI");
72
							"egi @@@ EGI", "mes @@@ MES");
73 73
				} else {
74 74
					return new ArrayList<String>();
75 75
				}
......
155 155

  
156 156
	}
157 157

  
158
	@Test
159
	public void testAsIndexRecord_ZenodoSw() throws Exception {
160
		testAsIndexRecord_json("test_zenodo_software.json");
161

  
162
	}
163

  
158 164
	private void testAsIndexRecord_json(final String filename) throws Exception {
159 165
		final ResultEntry pub =
160 166
				(new Gson()).fromJson(new InputStreamReader(getClass().getResourceAsStream(filename)), ResultEntry.class);

Also available in: Unified diff