diff --git a/source/test-java/org/alfresco/RemoteApi01TestSuite.java b/source/test-java/org/alfresco/RemoteApi01TestSuite.java
index 642670e5c5..25f82aabcc 100644
--- a/source/test-java/org/alfresco/RemoteApi01TestSuite.java
+++ b/source/test-java/org/alfresco/RemoteApi01TestSuite.java
@@ -68,6 +68,7 @@ public class RemoteApi01TestSuite extends TestSuite
suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.webdav.LockMethodTest.class));
suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.webdav.WebDAVHelperIntegrationTest.class));
suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.webdav.WebDAVMethodTest.class));
+ suite.addTestSuite(org.alfresco.repo.webservice.action.ActionWebServiceTest.class);
}
static void tests4(TestSuite suite) //
diff --git a/source/test-java/org/alfresco/repo/webservice/action/ActionWebServiceTest.java b/source/test-java/org/alfresco/repo/webservice/action/ActionWebServiceTest.java
new file mode 100644
index 0000000000..d5f6489b98
--- /dev/null
+++ b/source/test-java/org/alfresco/repo/webservice/action/ActionWebServiceTest.java
@@ -0,0 +1,93 @@
+/*
+ * Copyright (C) 2005-2014 Alfresco Software Limited.
+ *
+ * This file is part of Alfresco
+ *
+ * Alfresco is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Alfresco is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Alfresco. If not, see .
+ */
+package org.alfresco.repo.webservice.action;
+
+import org.alfresco.model.ContentModel;
+import org.alfresco.repo.security.authentication.AuthenticationComponent;
+import org.alfresco.repo.webservice.types.NamedValue;
+import org.alfresco.repo.webservice.types.ParentReference;
+import org.alfresco.repo.webservice.types.Predicate;
+import org.alfresco.repo.webservice.types.Reference;
+import org.alfresco.repo.webservice.types.Store;
+import org.alfresco.util.BaseSpringTest;
+
+/**
+ * Test for ActionWebService class.
+ *
+ * @author alex.mukha
+ * @since 4.2.4
+ */
+public class ActionWebServiceTest extends BaseSpringTest
+{
+ private AuthenticationComponent authenticationComponent;
+ private ActionWebService actionWebService;
+
+ private static String PARAM_PATH = "param-path";
+ private static String PARAM_CONTENT = "param-content";
+
+ @Override
+ protected String[] getConfigLocations()
+ {
+ return new String[] { "classpath:org/alfresco/repo/webservice/action/action-test.xml" };
+ }
+
+ @SuppressWarnings("deprecation")
+ @Override
+ protected void onSetUpInTransaction() throws Exception
+ {
+ this.actionWebService = (ActionWebService) this.applicationContext.getBean("actionWebService");
+ this.authenticationComponent = (AuthenticationComponent) this.applicationContext.getBean("authenticationComponent");
+
+ this.authenticationComponent.setSystemUserAsCurrentUser();
+ }
+
+ @SuppressWarnings("deprecation")
+ @Override
+ protected void onTearDownInTransaction() throws Exception
+ {
+ authenticationComponent.clearCurrentSecurityContext();
+ super.onTearDownInTransaction();
+ }
+
+ /**
+ * Test for MNT-9342
+ */
+ public void testActionMultipleProperties() throws Exception
+ {
+ Store storeRef = new Store("workspace", "SpacesStore");
+ ParentReference companyHomeParent = new ParentReference(storeRef, null, "/app:company_home", ContentModel.ASSOC_CONTAINS.toString(), null);
+ Predicate predicate = new Predicate(new Reference[] { companyHomeParent }, null, null);
+ String[] paramPath = { "path1", "path2", "path4" };
+ String[] paramContent = { "content1", "content2", "content3" };
+
+ // Create the action to create the document
+ NamedValue[] parameters = new NamedValue[] { new NamedValue(PARAM_PATH, true, null, paramPath), new NamedValue(PARAM_CONTENT, true, null, paramContent) };
+
+ Action newAction1 = new Action();
+ newAction1.setActionName("create-doc-action-test");
+ newAction1.setTitle("Create Document");
+ newAction1.setDescription("This will create the document an content");
+ newAction1.setParameters(parameters);
+
+ ActionExecutionResult[] results = null;
+ // An exception will be thrown here if the number of parameters passed to action executer will not match
+ results = actionWebService.executeActions(predicate, new Action[] { newAction1 });
+ assertNotNull(results);
+ }
+}
diff --git a/source/test-java/org/alfresco/repo/webservice/action/TestMultiplePropertiesActionExecutor.java b/source/test-java/org/alfresco/repo/webservice/action/TestMultiplePropertiesActionExecutor.java
new file mode 100644
index 0000000000..c65432a2b2
--- /dev/null
+++ b/source/test-java/org/alfresco/repo/webservice/action/TestMultiplePropertiesActionExecutor.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2005-2014 Alfresco Software Limited.
+ *
+ * This file is part of Alfresco
+ *
+ * Alfresco is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Alfresco is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Alfresco. If not, see .
+ */
+package org.alfresco.repo.webservice.action;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.alfresco.error.AlfrescoRuntimeException;
+import org.alfresco.repo.action.ParameterDefinitionImpl;
+import org.alfresco.repo.action.executer.ActionExecuterAbstractBase;
+import org.alfresco.service.cmr.action.ParameterDefinition;
+import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
+import org.alfresco.service.cmr.repository.NodeRef;
+
+/**
+ * Test action executer for {@link ActionWebServiceTest#testActionMultipleProperties()}
+ *
+ * @author alex.mukha
+ * @since 4.2.4
+ */
+public class TestMultiplePropertiesActionExecutor extends ActionExecuterAbstractBase
+{
+ private static String PARAM_PATH = "param-path";
+ private static String PARAM_CONTENT = "param-content";
+
+ @SuppressWarnings("unchecked")
+ @Override
+ protected void executeImpl(org.alfresco.service.cmr.action.Action action, NodeRef actionedUponNodeRef)
+ {
+ if (((ArrayList) action.getParameterValues().get(PARAM_PATH)).size() != 3)
+ {
+ throw new AlfrescoRuntimeException("There should be 3 parameters!");
+ }
+ if (((ArrayList) action.getParameterValues().get(PARAM_CONTENT)).size() != 3)
+ {
+ throw new AlfrescoRuntimeException("There should be 3 parameters!");
+ }
+ }
+
+ @Override
+ protected void addParameterDefinitions(List paramList)
+ {
+ paramList.add(new ParameterDefinitionImpl(PARAM_PATH, DataTypeDefinition.TEXT, true, "Path of the file to create", true));
+ paramList.add(new ParameterDefinitionImpl(PARAM_CONTENT, DataTypeDefinition.TEXT, true, "String representation of the content", true));
+ }
+}
diff --git a/source/test-resources/org/alfresco/repo/webservice/action/action-test.xml b/source/test-resources/org/alfresco/repo/webservice/action/action-test.xml
new file mode 100644
index 0000000000..0dbe28b7de
--- /dev/null
+++ b/source/test-resources/org/alfresco/repo/webservice/action/action-test.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+