use of org.codice.ddf.spatial.ogc.csw.catalog.common.GetCapabilitiesRequest in project ddf by codice.
the class TestCswEndpoint method testCapabilitiesRequestNoSections.
@Test
public void testCapabilitiesRequestNoSections() {
// Should return all sections
GetCapabilitiesRequest gcr = createDefaultGetCapabilitiesRequest();
CapabilitiesType ct = null;
try {
ct = csw.getCapabilities(gcr);
} catch (CswException e) {
fail("CswException caught during getCapabilities GET request: " + e.getMessage());
}
assertThat(ct, notNullValue());
verifyOperationsMetadata(ct);
verifyServiceIdentification(ct);
verifyServiceProvider(ct);
verifyFilterCapabilities(ct);
}
use of org.codice.ddf.spatial.ogc.csw.catalog.common.GetCapabilitiesRequest in project ddf by codice.
the class TestCswEndpoint method testCapabilitiesRequestNoVersion.
@Test
public void testCapabilitiesRequestNoVersion() {
// Should return all sections
GetCapabilitiesRequest gcr = createDefaultGetCapabilitiesRequest();
gcr.setAcceptVersions(null);
CapabilitiesType ct = null;
try {
ct = csw.getCapabilities(gcr);
} catch (CswException e) {
fail("CswException caught during getCapabilities GET request: " + e.getMessage());
}
assertThat(ct, notNullValue());
verifyOperationsMetadata(ct);
verifyServiceIdentification(ct);
verifyServiceProvider(ct);
verifyFilterCapabilities(ct);
}
use of org.codice.ddf.spatial.ogc.csw.catalog.common.GetCapabilitiesRequest in project ddf by codice.
the class TestCswEndpoint method testCapabilitiesRequestFilterCapabilities.
@Test
public void testCapabilitiesRequestFilterCapabilities() {
// Should only return the Filter_Capabilities section
GetCapabilitiesRequest gcr = createDefaultGetCapabilitiesRequest();
gcr.setSections(CswEndpoint.FILTER_CAPABILITIES);
CapabilitiesType ct = null;
try {
ct = csw.getCapabilities(gcr);
} catch (CswException e) {
fail("CswException caught during getCapabilities GET request: " + e.getMessage());
}
assertThat(ct, notNullValue());
assertThat(ct.getOperationsMetadata(), nullValue());
assertThat(ct.getServiceIdentification(), nullValue());
assertThat(ct.getServiceProvider(), nullValue());
verifyFilterCapabilities(ct);
}
use of org.codice.ddf.spatial.ogc.csw.catalog.common.GetCapabilitiesRequest in project ddf by codice.
the class TestCswEndpoint method testCapabilitiesRequestAllSections.
@Test
public void testCapabilitiesRequestAllSections() {
// Should return all sections
GetCapabilitiesRequest gcr = createDefaultGetCapabilitiesRequest();
gcr.setSections(CswEndpoint.SERVICE_IDENTIFICATION + "," + CswEndpoint.SERVICE_PROVIDER + "," + CswEndpoint.OPERATIONS_METADATA + "," + CswEndpoint.FILTER_CAPABILITIES);
CapabilitiesType ct = null;
try {
ct = csw.getCapabilities(gcr);
} catch (CswException e) {
fail("CswException caught during getCapabilities GET request: " + e.getMessage());
}
assertThat(ct, notNullValue());
verifyOperationsMetadata(ct);
verifyServiceIdentification(ct);
verifyServiceProvider(ct);
verifyFilterCapabilities(ct);
}
use of org.codice.ddf.spatial.ogc.csw.catalog.common.GetCapabilitiesRequest in project ddf by codice.
the class TestCswEndpoint method testCapabilitiesRequestServiceProvider.
@Test
public void testCapabilitiesRequestServiceProvider() {
// Should only return the ServiceProvider section
GetCapabilitiesRequest gcr = createDefaultGetCapabilitiesRequest();
gcr.setSections(CswEndpoint.SERVICE_PROVIDER);
CapabilitiesType ct = null;
try {
ct = csw.getCapabilities(gcr);
} catch (CswException e) {
fail("CswException caught during getCapabilities GET request: " + e.getMessage());
}
assertThat(ct, notNullValue());
assertThat(ct.getOperationsMetadata(), nullValue());
assertThat(ct.getServiceIdentification(), nullValue());
verifyFilterCapabilities(ct);
verifyServiceProvider(ct);
}
Aggregations