Search in sources :

Example 1 with KeyValuePairCollection

use of com.adaptris.util.KeyValuePairCollection in project interlok by adaptris.

the class MetadataHelperTest method testConvertFromKeyValuePairs.

@Test
public void testConvertFromKeyValuePairs() {
    KeyValuePairCollection elements = new KeyValuePairCollection();
    elements.add(new KeyValuePair("test", "value"));
    assertNotNull(convertFromKeyValuePairs(elements));
    assertTrue(convertFromKeyValuePairs(elements).contains(new MetadataElement("test", "")));
}
Also used : KeyValuePair(com.adaptris.util.KeyValuePair) KeyValuePairCollection(com.adaptris.util.KeyValuePairCollection) MetadataElement(com.adaptris.core.MetadataElement) Test(org.junit.Test)

Example 2 with KeyValuePairCollection

use of com.adaptris.util.KeyValuePairCollection in project interlok by adaptris.

the class MetadataCollectionTest method testContructor_KVPS.

@Test
public void testContructor_KVPS() {
    KeyValuePairCollection elements = new KeyValuePairCollection();
    elements.add(new KeyValuePair("test", "value"));
    MetadataCollection c = new MetadataCollection(elements);
    assertTrue(c.containsKey("test"));
}
Also used : KeyValuePair(com.adaptris.util.KeyValuePair) KeyValuePairCollection(com.adaptris.util.KeyValuePairCollection) Test(org.junit.Test)

Example 3 with KeyValuePairCollection

use of com.adaptris.util.KeyValuePairCollection in project interlok by adaptris.

the class CopyMetadataServiceTest method createService.

private CopyMetadataService createService() {
    CopyMetadataService service = new CopyMetadataService();
    service.setMetadataKeys(new KeyValuePairCollection(Arrays.asList(new KeyValuePair[] { new KeyValuePair(KEY_TO_BE_COPIED, NEW_KEY_1) })));
    return service;
}
Also used : KeyValuePair(com.adaptris.util.KeyValuePair) KeyValuePairCollection(com.adaptris.util.KeyValuePairCollection)

Aggregations

KeyValuePair (com.adaptris.util.KeyValuePair)3 KeyValuePairCollection (com.adaptris.util.KeyValuePairCollection)3 Test (org.junit.Test)2 MetadataElement (com.adaptris.core.MetadataElement)1