+ /*
+ <mappings>
+ <document type="geometry">
+ <import format="brep"/> <!-- Result Shape -->
+ </document>
+ <document type="model">
+ <import format="med"/> <!-- Result mesh without input parameters -->
+ </document>
+ <document type="loads">
+ <import format="c3m"/> <!-- Input data created interactively -->
+ </document>
+ <document type="results">
+ <import format="med"/> <!-- Calculation results source file -->
+ </document>
+ </mappings>
+ */
+ // Check state and processing instruction
+ String fileFormat = file.getPath().substring(
+ file.getPath().lastIndexOf('.') + 1);
+/* if (_projectSettings.doImport(dtype.getName(),
+ fileFormat)) {
+ Assert.assertTrue(file.isResult(),
+ "The file must be a result file.");
+ } else {
+ Assert.assertFalse(file.isResult(),
+ "The file must be a source file.");
+ }
+*/ if ((docIndex % 2) == 0) { // New
+ Assert.assertEquals(file.getState(), 'Y',
+ "File state must be actual ('Y').");
+ if (_projectSettings.doImport(dtype.getName(),
+ fileFormat)) {
+ Assert.assertEquals(file.getProcessing(),
+ "file-import",
+ "File must be imported.");
+ } else {
+ Assert.assertEquals(file.getProcessing(),
+ "file-download",
+ "File must be downloaded.");
+ }
+ } else { // Outdated
+ Assert.assertEquals(file.getState(), 'O',
+ "File state must be actual ('O').");
+ Assert
+ .assertEquals(file.getProcessing(),
+ "file-download",
+ "Outdated document should not be imported but downloaded.");
+ }