1 |
7689
|
tao
|
package edu.ucsb.nceas.metacat.index;
|
2 |
|
|
|
3 |
|
|
import static org.junit.Assert.assertTrue;
|
4 |
|
|
|
5 |
|
|
import org.dataone.service.types.v1.Identifier;
|
6 |
8826
|
leinfelder
|
import org.dataone.service.types.v2.SystemMetadata;
|
7 |
7689
|
tao
|
import org.junit.Test;
|
8 |
|
|
|
9 |
|
|
import com.hazelcast.core.IMap;
|
10 |
7791
|
tao
|
import com.hazelcast.core.ISet;
|
11 |
7689
|
tao
|
|
12 |
|
|
public class DistributedMapsFactoryIT {
|
13 |
|
|
/**
|
14 |
|
|
* Test to get the system metadata map
|
15 |
|
|
*/
|
16 |
|
|
@Test
|
17 |
|
|
public void testGetSystemMetadataMap() throws Exception {
|
18 |
|
|
IMap<Identifier, SystemMetadata> map = DistributedMapsFactory.getSystemMetadataMap();
|
19 |
|
|
System.out.println("the size of the map is "+map.size());
|
20 |
|
|
assertTrue("The size of the system metadata map should equal or be greater than 0", map.size() >= 0);
|
21 |
|
|
}
|
22 |
|
|
|
23 |
|
|
/**
|
24 |
|
|
* Test to get the system metadata map
|
25 |
|
|
*/
|
26 |
|
|
@Test
|
27 |
|
|
public void testGetObjectPathMap() throws Exception {
|
28 |
|
|
IMap<Identifier, String> map = DistributedMapsFactory.getObjectPathMap();
|
29 |
|
|
System.out.println("the size of the map is "+map.size());
|
30 |
|
|
assertTrue("The size of the object path map should equal or be greater than 0", map.size() >= 0);
|
31 |
|
|
}
|
32 |
7791
|
tao
|
|
33 |
|
|
/**
|
34 |
|
|
* Test to get the identifier set
|
35 |
|
|
*/
|
36 |
|
|
@Test
|
37 |
|
|
public void getGetIdentifierSet() throws Exception {
|
38 |
|
|
ISet identifiers = DistributedMapsFactory.getIdentifiersSet();
|
39 |
|
|
System.out.println("the size of the map is "+identifiers.size());
|
40 |
|
|
assertTrue("The size of the identifiers should equal or be greater than 0", identifiers.size() >= 0);
|
41 |
|
|
}
|
42 |
7689
|
tao
|
}
|