test
This commit is contained in:
parent
e85333fd7f
commit
8e5988b4e1
|
@ -0,0 +1,39 @@
|
||||||
|
package eu.dnetlib.app.directindex.clients;
|
||||||
|
|
||||||
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
|
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
import eu.dnetlib.app.directindex.clients.ProjectClient.ProjectInfo;
|
||||||
|
|
||||||
|
class ProjectClientTest {
|
||||||
|
|
||||||
|
// Class Under test
|
||||||
|
private ProjectClient projectClient;
|
||||||
|
|
||||||
|
@BeforeEach
|
||||||
|
public void initEach() {
|
||||||
|
projectClient = new ProjectClient();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void testResolveProjectLink() {
|
||||||
|
final ProjectInfo p = projectClient.resolveProjectLink("info:eu-repo/grantAgreement/EC/FP7/244909/EU/Making Capabilities Work/WorkAble");
|
||||||
|
|
||||||
|
assertNotNull(p);
|
||||||
|
assertEquals("corda_______::0035b3243c4f8a19718a7848188215f8", p.getId());
|
||||||
|
assertEquals("244909", p.getCode());
|
||||||
|
assertEquals("WorkAble", p.getAcronym());
|
||||||
|
assertEquals("Making Capabilities Work", p.getTitle());
|
||||||
|
assertEquals("ec__________::EC", p.getFunderId());
|
||||||
|
assertEquals("European Commission", p.getFunderName());
|
||||||
|
assertEquals("EC", p.getFunderShortName());
|
||||||
|
assertEquals("ec__________::EC::FP7", p.getFundingId());
|
||||||
|
assertEquals("FP7", p.getFundingName());
|
||||||
|
assertEquals("EU", p.getJurisdiction());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue