User user = aScen.getAuthor();
long userId = user.getIndex();
+
// ////////////////////////////////////////////////////////
- // Call checkin method for good prepared transient data.
+ // Call checkin method for empty list of modules.
// Simulate checkout
List<StepDTO> steps = _scenarioService.getScenarioInfo(scenarioId);
_scenarioService.checkout(aScen, user);
+ _scenarioDAO.flush();
+ // Check that scenario is no more marked as checked out
+ aScen = _scenarioDAO.get(scenarioId);
+ Assert.assertTrue(aScen.isCheckedout(),
+ "Scenario is not marked as checked out after checkout.");
// Prepare test data for checkin
// Checkin only two first steps (geom and mesh)
List<StepDTO> stepsToCheckin = new ArrayList<StepDTO>();
+ // Do test checkin
+ _scenarioService.checkin(scenarioId, userId, stepsToCheckin);
+
+ _scenarioDAO.flush();
+ // Check that scenario is no more marked as checked out
+ aScen = _scenarioDAO.get(scenarioId);
+ Assert.assertFalse(aScen.isCheckedout(),
+ "Scenario is still marked as checked out after checkin.");
+
+
+
+ // ////////////////////////////////////////////////////////
+ // Call checkin method for good prepared transient data.
+
+ // Simulate checkout
+ steps = _scenarioService.getScenarioInfo(scenarioId);
+ _scenarioService.checkout(aScen, user);
+
+ // Prepare test data for checkin
+ // Checkin only two first steps (geom and mesh)
for (StepDTO step : steps) {
// Prepare GEOM: checkin actual brep
StepDTO stepToCheckin = createDocDTOForModule(null, "GEOM", "brep",