import org.hibernate.criterion.Restrictions;
import org.splat.dal.bo.kernel.User;
import org.splat.dal.bo.som.Document;
+import org.splat.dal.bo.som.Document.Properties;
import org.splat.dal.bo.som.DocumentType;
import org.splat.dal.bo.som.ProgressState;
import org.splat.dal.bo.som.ProjectElement;
import org.splat.dal.bo.som.Publication;
import org.splat.dal.bo.som.Scenario;
import org.splat.dal.bo.som.Study;
-import org.splat.dal.bo.som.Document.Properties;
import org.splat.dal.dao.som.Database;
import org.splat.dal.dao.som.DocumentDAO;
import org.splat.dal.dao.som.StudyDAO;
LOG.debug("Created second id: " + id2);
- res = _studyDAO.getAll();
+ res = _studyDAO.getAll(Order.asc("rid"));
_studyDAO.flush();
Assert.assertNotNull(res,
import org.splat.service.KnowledgeElementTypeService;
import org.splat.service.SimulationContextService;
import org.splat.service.technical.ProjectSettingsService;
-import org.splat.service.technical.StepsConfigService;
import org.splat.service.technical.ProjectSettingsService.Step;
+import org.splat.service.technical.StepsConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.dao.DuplicateKeyException;
.getDefaultDocumentType(step, "xml").getName(),
"memorandum");
break;
+ case 6:
+ Assert.assertEquals(defTypes.size(), 2);
+ Assert.assertNull(_projectSettings.getDefaultDocumentType(
+ step, "pdf"));
+ Assert.assertNull(_projectSettings
+ .getDefaultDocumentType(step, "med"));
+ Assert.assertNotNull(_projectSettings
+ .getDefaultDocumentType(step, "py"));
+ Assert.assertEquals(_projectSettings
+ .getDefaultDocumentType(step, "py").getName(),
+ "visualisation");
+ Assert.assertNotNull(_projectSettings
+ .getDefaultDocumentType(step, "srd"));
+ Assert.assertEquals(_projectSettings
+ .getDefaultDocumentType(step, "srd").getName(),
+ "coparisonResult");
+ break;
+ case 7:
+ Assert.assertEquals(defTypes.size(), 1);
+ Assert.assertNull(_projectSettings.getDefaultDocumentType(
+ step, "pdf"));
+ Assert.assertNull(_projectSettings
+ .getDefaultDocumentType(step, "med"));
+ Assert.assertNull(_projectSettings
+ .getDefaultDocumentType(step, "py"));
+ Assert.assertNotNull(_projectSettings
+ .getDefaultDocumentType(step, "xml"));
+ Assert.assertEquals(_projectSettings
+ .getDefaultDocumentType(step, "xml").getName(),
+ "schema");
+ break;
default:
Assert.assertEquals(defTypes.size(), 0);
Assert.assertNull(_projectSettings.getDefaultDocumentType(