Revision 7555
Added by Jing Tao almost 11 years ago
SolrIndexTest.java | ||
---|---|---|
10 | 10 |
|
11 | 11 |
|
12 | 12 |
|
13 |
import org.dataone.service.types.v1.SystemMetadata; |
|
14 |
import org.dataone.service.util.TypeMarshaller; |
|
13 | 15 |
import org.junit.Test; |
14 | 16 |
|
15 | 17 |
public class SolrIndexTest { |
... | ... | |
24 | 26 |
@Test |
25 | 27 |
public void testInsert() throws Exception { |
26 | 28 |
SolrIndex solrIndex = generateSolrIndex(); |
27 |
InputStream systemInputStream = new FileInputStream(new File(SYSTEMMETAFILEPATH)); |
|
28 |
InputStream emlInputStream = new FileInputStream(new File(EMLFILEPATH)); |
|
29 |
solrIndex.insert(id, systemInputStream, emlInputStream); |
|
29 |
//InputStream systemInputStream = new FileInputStream(new File(SYSTEMMETAFILEPATH)); |
|
30 |
SystemMetadata systemMetadata = TypeMarshaller.unmarshalTypeFromFile(SystemMetadata.class, SYSTEMMETAFILEPATH); |
|
31 |
InputStream emlInputStream = new FileInputStream(new File(EMLFILEPATH)); |
|
32 |
solrIndex.insert(id, systemMetadata, emlInputStream); |
|
30 | 33 |
|
31 | 34 |
} |
32 | 35 |
|
Also available in: Unified diff
Change one parameter type of the insert method from the InputStream to the SystemMetadata.