Orcid Update Procedure #394
|
@ -1,6 +1,8 @@
|
||||||
|
|
||||||
package eu.dnetlib.dhp.oa.provision;
|
package eu.dnetlib.dhp.oa.provision;
|
||||||
|
|
||||||
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.StringReader;
|
import java.io.StringReader;
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
|
@ -32,8 +34,6 @@ import eu.dnetlib.dhp.oa.provision.utils.ISLookupClient;
|
||||||
import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpException;
|
import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpException;
|
||||||
import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpService;
|
import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpService;
|
||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
|
||||||
|
|
||||||
@ExtendWith(MockitoExtension.class)
|
@ExtendWith(MockitoExtension.class)
|
||||||
public class XmlIndexingJobTest extends SolrTest {
|
public class XmlIndexingJobTest extends SolrTest {
|
||||||
|
|
||||||
|
@ -110,34 +110,33 @@ public class XmlIndexingJobTest extends SolrTest {
|
||||||
QueryResponse rsp = miniCluster.getSolrClient().query(new SolrQuery().add(CommonParams.Q, "*:*"));
|
QueryResponse rsp = miniCluster.getSolrClient().query(new SolrQuery().add(CommonParams.Q, "*:*"));
|
||||||
|
|
||||||
assertEquals(
|
assertEquals(
|
||||||
nRecord, rsp.getResults().getNumFound(),
|
nRecord, rsp.getResults().getNumFound(),
|
||||||
"the number of indexed records should be equal to the number of input records");
|
"the number of indexed records should be equal to the number of input records");
|
||||||
|
|
||||||
|
|
||||||
rsp = miniCluster.getSolrClient().query(new SolrQuery().add(CommonParams.Q, "isgreen:true"));
|
rsp = miniCluster.getSolrClient().query(new SolrQuery().add(CommonParams.Q, "isgreen:true"));
|
||||||
assertEquals(
|
assertEquals(
|
||||||
0, rsp.getResults().getNumFound(),
|
0, rsp.getResults().getNumFound(),
|
||||||
"the number of indexed records having isgreen = true");
|
"the number of indexed records having isgreen = true");
|
||||||
|
|
||||||
rsp = miniCluster.getSolrClient().query(new SolrQuery().add(CommonParams.Q, "openaccesscolor:bronze"));
|
rsp = miniCluster.getSolrClient().query(new SolrQuery().add(CommonParams.Q, "openaccesscolor:bronze"));
|
||||||
assertEquals(
|
assertEquals(
|
||||||
0, rsp.getResults().getNumFound(),
|
0, rsp.getResults().getNumFound(),
|
||||||
"the number of indexed records having openaccesscolor = bronze");
|
"the number of indexed records having openaccesscolor = bronze");
|
||||||
|
|
||||||
rsp = miniCluster.getSolrClient().query(new SolrQuery().add(CommonParams.Q, "isindiamondjournal:true"));
|
rsp = miniCluster.getSolrClient().query(new SolrQuery().add(CommonParams.Q, "isindiamondjournal:true"));
|
||||||
assertEquals(
|
assertEquals(
|
||||||
0, rsp.getResults().getNumFound(),
|
0, rsp.getResults().getNumFound(),
|
||||||
"the number of indexed records having isindiamondjournal = true");
|
"the number of indexed records having isindiamondjournal = true");
|
||||||
|
|
||||||
rsp = miniCluster.getSolrClient().query(new SolrQuery().add(CommonParams.Q, "publiclyfunded:true"));
|
rsp = miniCluster.getSolrClient().query(new SolrQuery().add(CommonParams.Q, "publiclyfunded:true"));
|
||||||
assertEquals(
|
assertEquals(
|
||||||
0, rsp.getResults().getNumFound(),
|
0, rsp.getResults().getNumFound(),
|
||||||
"the number of indexed records having publiclyfunded = true");
|
"the number of indexed records having publiclyfunded = true");
|
||||||
|
|
||||||
rsp = miniCluster.getSolrClient().query(new SolrQuery().add(CommonParams.Q, "peerreviewed:true"));
|
rsp = miniCluster.getSolrClient().query(new SolrQuery().add(CommonParams.Q, "peerreviewed:true"));
|
||||||
assertEquals(
|
assertEquals(
|
||||||
0, rsp.getResults().getNumFound(),
|
0, rsp.getResults().getNumFound(),
|
||||||
"the number of indexed records having peerreviewed = true");
|
"the number of indexed records having peerreviewed = true");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Reference in New Issue