use of org.n52.sos.service.ProcedureDescriptionSettings in project SOS by 52North.
the class BoundingBoxEnrichmentTest method setUp.
@Before
public void setUp() throws OwsExceptionReport {
final SosOffering sosOffering = new SosOffering("offeringIdentifier", "offeringName");
final Collection<SosOffering> sosOfferings = Lists.newArrayList(sosOffering);
final Envelope envelope = new Envelope(1.0, 2.0, 3.0, 4.0);
final ReferencedEnvelope sosEnvelope = new ReferencedEnvelope(envelope, 4326);
Mockito.when(enrichmentMock.getSosOfferings()).thenReturn(sosOfferings);
Mockito.when(enrichmentMock.createEnvelopeForOfferings()).thenReturn(sosEnvelope);
final ProcedureDescriptionSettings procSettMock = Mockito.mock(ProcedureDescriptionSettings.class);
Mockito.when(procSettMock.getLatLongUom()).thenReturn("deg");
Mockito.when(enrichmentMock.procedureSettings()).thenReturn(procSettMock);
Mockito.doCallRealMethod().when(enrichmentMock).enrich((AbstractSensorML) ArgumentMatchers.any());
final GeometryHandler geomHandlerMock = Mockito.mock(GeometryHandler.class);
final AbstractProcedureCreationContext ctxMock = Mockito.mock(AbstractProcedureCreationContext.class);
Mockito.when(ctxMock.getGeometryHandler()).thenReturn(geomHandlerMock);
Mockito.when(geomHandlerMock.isNorthingFirstEpsgCode(sosEnvelope.getSrid())).thenReturn(true);
Mockito.when(enrichmentMock.getProcedureCreationContext()).thenReturn(ctxMock);
}
Aggregations