Search in sources :

Example 11 with AcknowledgementType

use of net.opengis.cat.csw.v_2_0_2.AcknowledgementType in project ddf by codice.

the class CswSubscriptionEndpointTest method testCreateRecordsSubscriptionGET.

@Test
public void testCreateRecordsSubscriptionGET() throws Exception {
    GetRecordsRequest getRecordsRequest = createDefaultGetRecordsRequest();
    getRecordsRequest.setResponseHandler(RESPONSE_HANDLER_URL);
    getRecordsRequest.setVersion("");
    Response response = cswSubscriptionEndpoint.createRecordsSubscription(getRecordsRequest);
    AcknowledgementType createAck = (AcknowledgementType) response.getEntity();
    assertThat(createAck, notNullValue());
    verify(mockContext).registerService(eq(Subscription.class.getName()), any(Subscription.class), any(Dictionary.class));
}
Also used : Response(javax.ws.rs.core.Response) Dictionary(java.util.Dictionary) Subscription(ddf.catalog.event.Subscription) CswSubscription(org.codice.ddf.spatial.ogc.csw.catalog.endpoint.event.CswSubscription) AcknowledgementType(net.opengis.cat.csw.v_2_0_2.AcknowledgementType) GetRecordsRequest(org.codice.ddf.spatial.ogc.csw.catalog.common.GetRecordsRequest) Test(org.junit.Test)

Aggregations

AcknowledgementType (net.opengis.cat.csw.v_2_0_2.AcknowledgementType)11 Response (javax.ws.rs.core.Response)8 Test (org.junit.Test)8 GetRecordsType (net.opengis.cat.csw.v_2_0_2.GetRecordsType)6 SourceResponse (ddf.catalog.operation.SourceResponse)5 ResourceResponse (ddf.catalog.operation.ResourceResponse)4 CswSubscribe (org.codice.ddf.spatial.ogc.csw.catalog.common.CswSubscribe)4 Matchers.anyString (org.mockito.Matchers.anyString)4 Subscription (ddf.catalog.event.Subscription)3 Dictionary (java.util.Dictionary)3 JAXBElement (javax.xml.bind.JAXBElement)3 CswSourceConfiguration (org.codice.ddf.spatial.ogc.csw.catalog.common.CswSourceConfiguration)3 GetRecordsRequest (org.codice.ddf.spatial.ogc.csw.catalog.common.GetRecordsRequest)3 CswSubscription (org.codice.ddf.spatial.ogc.csw.catalog.endpoint.event.CswSubscription)3 EchoedRequestType (net.opengis.cat.csw.v_2_0_2.EchoedRequestType)2 BinaryContent (ddf.catalog.data.BinaryContent)1 CatalogTransformerException (ddf.catalog.transform.CatalogTransformerException)1 ByteArrayInputStream (java.io.ByteArrayInputStream)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 Serializable (java.io.Serializable)1