Search in sources :

Example 1 with AttributeMetacardTransformer

use of ddf.catalog.transformer.attribute.AttributeMetacardTransformer in project ddf by codice.

the class TestActionProviderRegistryProxy method testAttributeTransformer.

@Test
public void testAttributeTransformer() throws MimeTypeParseException {
    // given
    ActionProviderRegistryProxy proxy = new ActionProviderRegistryProxyTest(mtapf);
    when(mockBundleContext.getService(mockServiceReference)).thenReturn(new AttributeMetacardTransformer("metadata", "metadata", new MimeType("text", "xml")));
    // when
    proxy.bind(mockServiceReference);
    // then
    verify(mockBundleContext, times(1)).registerService(anyString(), captor.capture(), any(Dictionary.class));
    Object value = captor.getValue();
    assertThat(value, notNullValue());
    assertThat(value instanceof ActionProvider, is(true));
}
Also used : AttributeMetacardTransformer(ddf.catalog.transformer.attribute.AttributeMetacardTransformer) Dictionary(java.util.Dictionary) ActionProvider(ddf.action.ActionProvider) MimeType(javax.activation.MimeType) Test(org.junit.Test)

Aggregations

ActionProvider (ddf.action.ActionProvider)1 AttributeMetacardTransformer (ddf.catalog.transformer.attribute.AttributeMetacardTransformer)1 Dictionary (java.util.Dictionary)1 MimeType (javax.activation.MimeType)1 Test (org.junit.Test)1