1
|
package leu.dnetlib.msro.openaireplus.workflows.nodes.claims;
|
2
|
|
3
|
import eu.dnetlib.msro.openaireplus.workflows.nodes.claims.ApplyClaimRelsJobNode;
|
4
|
import eu.dnetlib.msro.rmi.MSROException;
|
5
|
import org.junit.Test;
|
6
|
|
7
|
/**
|
8
|
* Created by Alessia Bardi on 26/06/2017.
|
9
|
*
|
10
|
* @author Alessia Bardi
|
11
|
*/
|
12
|
public class ApplyClaimRelsJobNodeTest {
|
13
|
|
14
|
private ApplyClaimRelsJobNode applyClaims = new ApplyClaimRelsJobNode();
|
15
|
|
16
|
|
17
|
@Test
|
18
|
public void testGetValue() throws MSROException {
|
19
|
|
20
|
String sourceId = "40|corda_______::9f752db0b5ec9ca23673ca7f4cb0808e";
|
21
|
String semantics = "resultProject_outcome_produces";
|
22
|
String targetId = "50|userclaim___::6a8f649d968e734a6733c23a351c1859";
|
23
|
long time = System.currentTimeMillis();
|
24
|
//final String sourceId, final String semantics, final String targetId, final long timestamp
|
25
|
String res = applyClaims.getValue(sourceId, semantics, targetId, time);
|
26
|
System.out.println(res);
|
27
|
}
|
28
|
|
29
|
@Test(expected = MSROException.class)
|
30
|
public void testGetValueErrSem() throws MSROException {
|
31
|
|
32
|
String sourceId = "40|corda_______::9f752db0b5ec9ca23673ca7f4cb0808e";
|
33
|
String semantics = "produces";
|
34
|
String targetId = "50|userclaim___::6a8f649d968e734a6733c23a351c1859";
|
35
|
long time = System.currentTimeMillis();
|
36
|
//final String sourceId, final String semantics, final String targetId, final long timestamp
|
37
|
String res = applyClaims.getValue(sourceId, semantics, targetId, time);
|
38
|
System.out.println(res);
|
39
|
}
|
40
|
}
|