Revision 7548
Added by Jing Tao almost 11 years ago
SolrIndexTest.java | ||
---|---|---|
16 | 16 |
|
17 | 17 |
private static final String SYSTEMMETAFILEPATH = "src/test/resources/eml-system-meta-example.xml"; |
18 | 18 |
private static final String EMLFILEPATH = "src/test/resources/eml-example.xml"; |
19 |
private static final String id = "urn:uuid:606a19dd-b531-4bf4-b5a5-6d06c3d39098"; |
|
19 | 20 |
|
20 | 21 |
/** |
21 | 22 |
* Test building index for an insert. |
... | ... | |
25 | 26 |
SolrIndex solrIndex = generateSolrIndex(); |
26 | 27 |
InputStream systemInputStream = new FileInputStream(new File(SYSTEMMETAFILEPATH)); |
27 | 28 |
InputStream emlInputStream = new FileInputStream(new File(EMLFILEPATH)); |
28 |
String id = "urn:uuid:606a19dd-b531-4bf4-b5a5-6d06c3d39098"; |
|
29 | 29 |
solrIndex.insert(id, systemInputStream, emlInputStream); |
30 | 30 |
|
31 | 31 |
} |
32 | 32 |
|
33 |
/** |
|
34 |
* Test building index for an insert. |
|
35 |
*/ |
|
36 |
@Test |
|
37 |
public void testDelete() throws Exception { |
|
38 |
SolrIndex solrIndex = generateSolrIndex(); |
|
39 |
solrIndex.remove(id); |
|
40 |
|
|
41 |
} |
|
42 |
|
|
33 | 43 |
private SolrIndex generateSolrIndex() throws Exception { |
34 | 44 |
ApplicationController controller = new ApplicationController(); |
35 | 45 |
List<SolrIndex> list = controller.getSolrIndexes(); |
Also available in: Unified diff
Use the EmbeddedSolrServer to replace HttpSolrServer. Now it still has some issues.