public void testGetTuples() { ConverterTuple[] initialTuples = prepareTuples(); ConverterTuple[] expectedTuples = new ConverterTuple[] {new ConverterTuple(null, "link", "href")}; ConverterConfiguration configuration = new ConverterConfiguration(initialTuples); ConverterTuple[] received = configuration.getTuples(null, "link"); assertTrue(areTuplesArrayEquals(expectedTuples, received)); }
public void testPutTuples() { ConverterTuple[] initialTuples = prepareTuples(); ConverterTuple[] expectedTuples = new ConverterTuple[] {new ConverterTuple(null, "link", "href")}; ConverterConfiguration configuration = new ConverterConfiguration(); configuration.putTuplesByMode("html", initialTuples); ConverterTuple[] received = configuration.getTuplesByMode(null, "link", "html"); assertNotNull(received); assertTrue(areTuplesArrayEquals(expectedTuples, received)); ConverterTuple[] receivedBad = configuration.getTuplesByMode(null, "link", "xdime"); assertNull(receivedBad); }