use of ddf.catalog.operation.impl.CreateResponseImpl in project ddf by codice.
the class RegistryIdPostIngestPluginTest method testProcessCreateInternal.
@Test
public void testProcessCreateInternal() throws Exception {
CreateResponse response = new CreateResponseImpl(null, null, Collections.singletonList(getDefaultInternalMetacard()));
registryIdPostIngestPlugin.process(response);
assertThat(registryIdPostIngestPlugin.getRegistryIds().size(), equalTo(0));
assertThat(registryIdPostIngestPlugin.getRemoteMetacardIds().size(), equalTo(1));
assertThat(registryIdPostIngestPlugin.getRemoteMetacardIds().iterator().next(), equalTo("remoteMcardId"));
}
use of ddf.catalog.operation.impl.CreateResponseImpl in project ddf by codice.
the class RegistryIdPostIngestPluginTest method testProcessDeleteInternal.
@Test
public void testProcessDeleteInternal() throws Exception {
CreateResponse createResponse = new CreateResponseImpl(null, null, Collections.singletonList(getDefaultInternalMetacard()));
registryIdPostIngestPlugin.process(createResponse);
DeleteResponse deleteResponse = new DeleteResponseImpl(null, null, Collections.singletonList(getDefaultInternalMetacard()));
registryIdPostIngestPlugin.process(deleteResponse);
assertThat(registryIdPostIngestPlugin.getRemoteMetacardIds().size(), equalTo(0));
}
use of ddf.catalog.operation.impl.CreateResponseImpl in project ddf by codice.
the class RegistryIdPostIngestPluginTest method testProcessCreate.
@Test
public void testProcessCreate() throws Exception {
CreateResponse response = new CreateResponseImpl(null, null, Collections.singletonList(getDefaultMetacard()));
registryIdPostIngestPlugin.process(response);
assertThat(registryIdPostIngestPlugin.getRegistryIds().size(), equalTo(1));
assertThat(registryIdPostIngestPlugin.getRegistryIds().iterator().next(), equalTo("regId"));
}
Aggregations