Search in sources :

Example 6 with MetacardTypeAdapter

use of ddf.catalog.transformer.xml.adapter.MetacardTypeAdapter in project ddf by codice.

the class TestMetacardTypeAdapter method testUnmarshalWithNullTypeName.

@Test
public void testUnmarshalWithNullTypeName() throws CatalogTransformerException {
    MetacardTypeAdapter metacardTypeAdpater = new MetacardTypeAdapter();
    MetacardType metacardType = metacardTypeAdpater.unmarshal(NULL_TYPE_NAME);
    assertThat(metacardType.getName(), is(BasicTypes.BASIC_METACARD.getName()));
}
Also used : MetacardTypeAdapter(ddf.catalog.transformer.xml.adapter.MetacardTypeAdapter) MetacardType(ddf.catalog.data.MetacardType) Test(org.junit.Test)

Example 7 with MetacardTypeAdapter

use of ddf.catalog.transformer.xml.adapter.MetacardTypeAdapter in project ddf by codice.

the class TestMetacardTypeAdapter method testUnmarshalWithEmptyRegisteredMetacardTypes.

@Test
public void testUnmarshalWithEmptyRegisteredMetacardTypes() throws CatalogTransformerException {
    MetacardTypeAdapter metacardTypeAdpater = new MetacardTypeAdapter(EMPTY_METACARD_TYPES_LIST);
    MetacardType metacardType = metacardTypeAdpater.unmarshal(UNKNOWN_TYPE_NAME);
    assertThat(metacardType.getName(), is(BasicTypes.BASIC_METACARD.getName()));
}
Also used : MetacardTypeAdapter(ddf.catalog.transformer.xml.adapter.MetacardTypeAdapter) MetacardType(ddf.catalog.data.MetacardType) Test(org.junit.Test)

Aggregations

MetacardType (ddf.catalog.data.MetacardType)7 MetacardTypeAdapter (ddf.catalog.transformer.xml.adapter.MetacardTypeAdapter)7 Test (org.junit.Test)7 AttributeDescriptor (ddf.catalog.data.AttributeDescriptor)3 MetacardTypeImpl (ddf.catalog.data.impl.MetacardTypeImpl)3 ArrayList (java.util.ArrayList)3