use of io.restassured.path.xml.XmlPath in project ddf by codice.
the class TestCatalog method testIngestXmlNoExtension.
// Is this test bad??
@Ignore
@Test
public void testIngestXmlNoExtension() throws Exception {
final String TMP_PREFIX = "tcdm_";
Path tmpDir = Files.createTempDirectory(TMP_PREFIX);
tmpDir.toFile().deleteOnExit();
Path tmpFile = Files.createTempFile(tmpDir, TMP_PREFIX, "_tmp");
tmpFile.toFile().deleteOnExit();
Files.copy(getFileContentAsStream("metacard5.xml"), tmpFile, StandardCopyOption.REPLACE_EXISTING);
Map<String, Object> cdmProperties = new HashMap<>(getServiceManager().getMetatypeDefaults("content-core-directorymonitor", "org.codice.ddf.catalog.content.monitor.ContentDirectoryMonitor"));
cdmProperties.put("monitoredDirectoryPath", tmpDir.toString() + "/");
cdmProperties.put("processingMechanism", ContentDirectoryMonitor.IN_PLACE);
Configuration managedService = getServiceManager().createManagedService("org.codice.ddf.catalog.content.monitor.ContentDirectoryMonitor", cdmProperties);
ValidatableResponse response = assertIngestedDirectoryMonitor("SysAdmin", 1);
boolean result = response.extract().xmlPath().getString("metacards.metacard.type").equals("ddf.metacard");
assertThat(result, is(true));
getServiceManager().stopManagedService(managedService.getPid());
}
Aggregations