From f9d3105c9600a514a3889f83f0c9eaa63bc4c3e4 Mon Sep 17 00:00:00 2001 From: rkv Date: Tue, 4 Dec 2012 07:00:45 +0000 Subject: [PATCH] Added test of checkin with empty list of steps. --- .../src/test/splat/service/TestScenarioService.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Workspace/Siman-Common/src/test/splat/service/TestScenarioService.java b/Workspace/Siman-Common/src/test/splat/service/TestScenarioService.java index 5a391b7..ef5fce1 100644 --- a/Workspace/Siman-Common/src/test/splat/service/TestScenarioService.java +++ b/Workspace/Siman-Common/src/test/splat/service/TestScenarioService.java @@ -23,7 +23,6 @@ import java.util.Set; import org.splat.dal.bo.kernel.Relation; 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.KnowledgeElementType; import org.splat.dal.bo.som.Publication; @@ -33,6 +32,7 @@ import org.splat.dal.bo.som.SimulationContextType; import org.splat.dal.bo.som.Study; import org.splat.dal.bo.som.UsedByRelation; import org.splat.dal.bo.som.UsesRelation; +import org.splat.dal.bo.som.Document.Properties; import org.splat.dal.dao.som.Database; import org.splat.dal.dao.som.ScenarioDAO; import org.splat.kernel.InvalidPropertyException; @@ -51,8 +51,8 @@ import org.splat.service.dto.DocumentDTO; import org.splat.service.dto.FileDTO; import org.splat.service.dto.StepDTO; import org.splat.service.technical.ProjectSettingsService; -import org.splat.service.technical.ProjectSettingsService.Step; import org.splat.service.technical.RepositoryService; +import org.splat.service.technical.ProjectSettingsService.Step; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.orm.hibernate3.HibernateTemplate; @@ -505,6 +505,10 @@ public class TestScenarioService extends BaseTest { + e.getClass().getSimpleName() + ": " + e.getMessage()); } + // Test checkin with empty list of steps + stepsToCheckin.clear(); + _scenarioService.checkin(scenarioId, userId, stepsToCheckin); + rollbackNestedTransaction(); LOG.debug(">>>>> END testCheckin()"); } -- 2.39.2