Reverse Merged. Commit to wrong branch. Should have been HEAD-BUG-FIX.

57334: Moved test_indexCheckService.js to test-resources, BDE-195
   57335: Enterprise depends on wdr-deployment, BDE-195
   57336: An explicit instruction to Junit to ignore this class, BDE-195
   57337: Excluding wcm tests that aren't run in ant, BDE-195
   57339: Fixed failing tests by loading the test resource config from the class path, BDE-195


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/V4.2-BUG-FIX/root@57353 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2013-10-30 10:29:01 +00:00
parent 6a0db7b688
commit 6e4c59fee5

View File

@@ -20,10 +20,16 @@ package org.alfresco.web.config;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.StringTokenizer;
import org.springframework.extensions.config.Config;
import org.springframework.extensions.config.ConfigElement;
import org.springframework.extensions.config.ConfigException;
import org.springframework.extensions.config.xml.XMLConfigService;
import org.alfresco.service.namespace.QName;
import org.alfresco.util.BaseTest;
import org.alfresco.web.config.ActionsConfigElement.ActionDefinition;
@@ -35,10 +41,6 @@ import org.alfresco.web.config.WizardsConfigElement.ConditionalPageConfig;
import org.alfresco.web.config.WizardsConfigElement.PageConfig;
import org.alfresco.web.config.WizardsConfigElement.StepConfig;
import org.alfresco.web.config.WizardsConfigElement.WizardConfig;
import org.springframework.extensions.config.Config;
import org.springframework.extensions.config.ConfigElement;
import org.springframework.extensions.config.ConfigException;
import org.springframework.extensions.config.xml.XMLConfigService;
/**
* JUnit tests to exercise the capabilities added to the web client config
@@ -48,10 +50,6 @@ import org.springframework.extensions.config.xml.XMLConfigService;
*/
public class WebClientConfigTest extends BaseTest
{
private static final String TEST_CONFIG = "test-config.xml";
private static final String TEST_CONFIG_OVERRIDE = "test-config-override.xml";
private static final String CLASSPATH_RESOURCE = "classpath:";
/**
* @see junit.framework.TestCase#setUp()
*/
@@ -65,7 +63,7 @@ public class WebClientConfigTest extends BaseTest
*/
public void testPropertySheetConfig()
{
XMLConfigService svc = initXMLConfigService(TEST_CONFIG);
XMLConfigService svc = initXMLConfigService("test-config.xml");
// get hold of the property sheet config from the global section
Config global = svc.getGlobalConfig();
@@ -124,15 +122,9 @@ public class WebClientConfigTest extends BaseTest
}
@Override
public String getResourcesDir()
{
return CLASSPATH_RESOURCE;
}
public void testPropertyViewing()
{
XMLConfigService svc = initXMLConfigService(TEST_CONFIG);
XMLConfigService svc = initXMLConfigService("test-config.xml");
Config propViewConfig = svc.getConfig("Property Viewing");
assertNotNull("Property Viewing section should not be null", propViewConfig);
@@ -170,7 +162,7 @@ public void testPropertyViewing()
public void testPropertyEditing()
{
XMLConfigService svc = initXMLConfigService(TEST_CONFIG);
XMLConfigService svc = initXMLConfigService("test-config.xml");
Config propEditConfig = svc.getConfig("Property Editing");
assertNotNull("Property Editing section should not be null", propEditConfig);
@@ -211,7 +203,7 @@ public void testPropertyViewing()
public void testPropertyOverride()
{
XMLConfigService svc = initXMLConfigService(TEST_CONFIG, TEST_CONFIG_OVERRIDE);
XMLConfigService svc = initXMLConfigService("test-config.xml", "test-config-override.xml");
// get the config for the size property in the space-aspect property sheet
PropertySheetConfigElement propSheet = ((PropertySheetConfigElement)svc.getConfig("space-aspect").
@@ -286,7 +278,7 @@ public void testPropertyViewing()
*/
public void testClientConfig()
{
XMLConfigService svc = initXMLConfigService(TEST_CONFIG);
XMLConfigService svc = initXMLConfigService("test-config.xml");
// get the global config and from that the client config
ClientConfigElement clientConfig = (ClientConfigElement)svc.getGlobalConfig().
@@ -306,7 +298,7 @@ public void testPropertyViewing()
public void testClientOverride()
{
XMLConfigService svc = initXMLConfigService(TEST_CONFIG, TEST_CONFIG_OVERRIDE);
XMLConfigService svc = initXMLConfigService("test-config.xml", "test-config-override.xml");
// try and get the global config section
Config globalSection = svc.getGlobalConfig();
@@ -338,7 +330,7 @@ public void testPropertyViewing()
*/
public void testNavigation()
{
XMLConfigService svc = initXMLConfigService(TEST_CONFIG);
XMLConfigService svc = initXMLConfigService("test-config.xml");
// *** Test the returning of a view id override
Config testCfg = svc.getConfig("viewid-navigation-result");
@@ -413,7 +405,7 @@ public void testPropertyViewing()
public void testNavigationGenericConfig()
{
XMLConfigService svc = initXMLConfigService(TEST_CONFIG);
XMLConfigService svc = initXMLConfigService("test-config.xml");
// do a lookup using the generic config elements and make sure the correct
// info comes out
@@ -459,7 +451,7 @@ public void testPropertyViewing()
public void testLanguages()
{
XMLConfigService svc = initXMLConfigService(TEST_CONFIG, TEST_CONFIG_OVERRIDE);
XMLConfigService svc = initXMLConfigService("test-config.xml", "test-config-override.xml");
LanguagesConfigElement config = (LanguagesConfigElement)svc.getConfig("Languages").
getConfigElement(LanguagesConfigElement.CONFIG_ELEMENT_ID);
@@ -494,7 +486,7 @@ public void testPropertyViewing()
public void testAdvancedSearch()
{
XMLConfigService svc = initXMLConfigService(TEST_CONFIG, TEST_CONFIG_OVERRIDE);
XMLConfigService svc = initXMLConfigService("test-config.xml", "test-config-override.xml");
AdvancedSearchConfigElement config = (AdvancedSearchConfigElement)svc.getConfig("Advanced Search").
getConfigElement(AdvancedSearchConfigElement.CONFIG_ELEMENT_ID);
@@ -537,7 +529,7 @@ public void testPropertyViewing()
public void testViews()
{
XMLConfigService svc = initXMLConfigService(TEST_CONFIG, TEST_CONFIG_OVERRIDE);
XMLConfigService svc = initXMLConfigService("test-config.xml", "test-config-override.xml");
ViewsConfigElement config = (ViewsConfigElement)svc.getConfig("Views").
getConfigElement(ViewsConfigElement.CONFIG_ELEMENT_ID);
@@ -669,7 +661,7 @@ public void testPropertyViewing()
public void testDialogOverride()
{
XMLConfigService svc = initXMLConfigService("test-config-dialogs-wizards.xml", TEST_CONFIG_OVERRIDE);
XMLConfigService svc = initXMLConfigService("test-config-dialogs-wizards.xml", "test-config-override.xml");
// get the 'dialogs' element
DialogsConfigElement dialogsElement = ((DialogsConfigElement)svc.getConfig("Dialogs").
@@ -811,7 +803,7 @@ public void testPropertyViewing()
public void testActions()
{
XMLConfigService svc = initXMLConfigService(TEST_CONFIG);
XMLConfigService svc = initXMLConfigService("test-config.xml");
// get the "Actions" config
Config cfg = svc.getGlobalConfig();
@@ -847,7 +839,7 @@ public void testPropertyViewing()
public void testActionsOverriding()
{
XMLConfigService svc = initXMLConfigService(TEST_CONFIG, TEST_CONFIG_OVERRIDE);
XMLConfigService svc = initXMLConfigService("test-config.xml", "test-config-override.xml");
// get the "Actions" config
Config cfg = svc.getConfig("Actions Override");
@@ -908,7 +900,7 @@ public void testPropertyViewing()
public void testETHREEOH2145()
{
XMLConfigService svc = initXMLConfigService(TEST_CONFIG, "test-config-e30-2145.xml");
XMLConfigService svc = initXMLConfigService("test-config.xml", "test-config-e30-2145.xml");
// get the "client" config from global config section
Config cfg = svc.getGlobalConfig();
@@ -930,7 +922,7 @@ public void testPropertyViewing()
public void testWCM()
{
// setup the config service
XMLConfigService svc = initXMLConfigService(TEST_CONFIG);
XMLConfigService svc = initXMLConfigService("test-config.xml");
// get the global config object
Config global = svc.getGlobalConfig();
@@ -989,7 +981,7 @@ public void testPropertyViewing()
public void testWCMOverride()
{
// setup the config service
XMLConfigService svc = initXMLConfigService(TEST_CONFIG, TEST_CONFIG_OVERRIDE);
XMLConfigService svc = initXMLConfigService("test-config.xml", "test-config-override.xml");
// get the global config object
Config global = svc.getGlobalConfig();