Search in sources :

Example 1 with KmlMarshaller

use of org.codice.ddf.spatial.kml.util.KmlMarshaller in project ddf by codice.

the class KMLTransformerImplTest method setUp.

@BeforeClass
public static void setUp() throws IOException {
    metacardDate = new Date(metacardDate.getTime() + Calendar.getInstance().getTimeZone().getOffset(metacardDate.getTime()));
    when(mockContext.getBundle()).thenReturn(mockBundle);
    URL url = KMLTransformerImplTest.class.getResource(DEFAULT_STYLE_LOCATION);
    when(mockBundle.getResource(any(String.class))).thenReturn(url);
    dateFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
    ActionProvider mockActionProvider = mock(ActionProvider.class);
    Action mockAction = mock(Action.class);
    when(mockActionProvider.getAction(any(Metacard.class))).thenReturn(mockAction);
    when(mockAction.getUrl()).thenReturn(new URL(ACTION_URL));
    kmlTransformer = new KMLTransformerImpl(mockContext, DEFAULT_STYLE_LOCATION, new KmlStyleMap(), mockActionProvider, new KmlMarshaller());
}
Also used : ActionProvider(ddf.action.ActionProvider) Action(ddf.action.Action) Metacard(ddf.catalog.data.Metacard) LineString(de.micromata.opengis.kml.v_2_2_0.LineString) Date(java.util.Date) URL(java.net.URL) KmlMarshaller(org.codice.ddf.spatial.kml.util.KmlMarshaller) BeforeClass(org.junit.BeforeClass)

Aggregations

Action (ddf.action.Action)1 ActionProvider (ddf.action.ActionProvider)1 Metacard (ddf.catalog.data.Metacard)1 LineString (de.micromata.opengis.kml.v_2_2_0.LineString)1 URL (java.net.URL)1 Date (java.util.Date)1 KmlMarshaller (org.codice.ddf.spatial.kml.util.KmlMarshaller)1 BeforeClass (org.junit.BeforeClass)1