Revision 56104
Added by Claudio Atzori almost 5 years ago
DedupConfigurationOrchestrationTest.java | ||
---|---|---|
4 | 4 |
import static org.junit.Assert.assertTrue; |
5 | 5 |
|
6 | 6 |
import java.io.IOException; |
7 |
import java.nio.charset.Charset; |
|
7 | 8 |
import java.util.Queue; |
8 | 9 |
|
10 |
import org.apache.commons.io.IOUtils; |
|
9 | 11 |
import org.junit.Before; |
10 | 12 |
import org.junit.Test; |
11 | 13 |
|
... | ... | |
42 | 44 |
assertNotNull(anotherDco); |
43 | 45 |
assertTrue(json.equals(anotherDco.toString())); |
44 | 46 |
} |
47 |
|
|
48 |
@Test |
|
49 |
public void testSerializationOrgs() throws IOException { |
|
50 |
|
|
51 |
final Entity e = new Entity("organization", "20", "Organization"); |
|
52 |
|
|
53 |
final String actionSetId = "001"; |
|
54 |
final Queue<DedupConfig> configurations = Lists.newLinkedList(); |
|
55 |
|
|
56 |
configurations.add(DedupConfig.load(IOUtils.toString(getClass().getResourceAsStream("organisation.conf.json"), Charset.forName("UTF-8")))); |
|
57 |
dco = new DedupConfigurationOrchestration(e, actionSetId, configurations); |
|
58 |
|
|
59 |
System.out.println(dco.toString()); |
|
60 |
|
|
61 |
} |
|
45 | 62 |
} |
Also available in: Unified diff
using jackson to serialise dedup configurations