Examples of MockConfigurationProvider


Examples of com.opensymphony.xwork2.config.providers.MockConfigurationProvider

    }

    @Override
    protected void setUp() throws Exception {
        super.setUp();
        loadConfigurationProviders(new XmlConfigurationProvider("xwork-test-beans.xml"), new MockConfigurationProvider());

        ActionConfig config = configuration.getRuntimeConfiguration().getActionConfig("", MockConfigurationProvider.PARAM_INTERCEPTOR_ACTION_NAME);
        container.inject(config.getInterceptors().get(0).getInterceptor());
    }
View Full Code Here

Examples of com.opensymphony.xwork2.config.providers.MockConfigurationProvider

        }
    }

    @Override
    protected void setUp() throws Exception {
        loadConfigurationProviders(new XmlConfigurationProvider("xwork-test-beans.xml"), new MockConfigurationProvider());
    }
View Full Code Here

Examples of com.opensymphony.xwork2.config.providers.MockConfigurationProvider

        }
    }

    @Override
    protected void setUp() throws Exception {
        loadConfigurationProviders(new XmlConfigurationProvider("xwork-test-beans.xml"), new MockConfigurationProvider());
    }
View Full Code Here

Examples of com.opensymphony.xwork2.config.providers.MockConfigurationProvider

        assertTrue(!context.hasErrors()); // should pass as null value passed in
    }

    @Override
    protected void setUp() throws Exception {
        loadConfigurationProviders(new XmlConfigurationProvider("xwork-default.xml")new MockConfigurationProvider());
        val = new DoubleRangeFieldValidator();
        val.setValueStack(ActionContext.getContext().getValueStack());
    }
View Full Code Here

Examples of com.opensymphony.xwork2.config.providers.MockConfigurationProvider

    @Override
    protected void setUp() throws Exception {
        super.setUp();
        origLocale = Locale.getDefault();
        Locale.setDefault(Locale.US);
        loadConfigurationProviders(new MockConfigurationProvider());
    }
View Full Code Here

Examples of com.opensymphony.xwork2.config.providers.MockConfigurationProvider

            fail();
        }
    }

    public void testMultipleConfigProviders() {
        configurationManager.addConfigurationProvider(new MockConfigurationProvider());

        try {
            configurationManager.reload();
        } catch (ConfigurationException e) {
            e.printStackTrace();
View Full Code Here

Examples of com.opensymphony.xwork2.config.providers.MockConfigurationProvider

        }
    }

    @Override
    protected void setUp() throws Exception {
        loadConfigurationProviders(new XmlConfigurationProvider("xwork-test-beans.xml"), new MockConfigurationProvider());
    }
View Full Code Here

Examples of com.opensymphony.xwork2.config.providers.MockConfigurationProvider

    }

    @Override
    protected void setUp() throws Exception {
        super.setUp();
        loadConfigurationProviders(new MockConfigurationProvider());

        ActionConfig config = new ActionConfig.Builder("", "name", "").build();
        ActionInvocation invocation = EasyMock.createNiceMock(ActionInvocation.class);
        ActionProxy proxy = EasyMock.createNiceMock(ActionProxy.class);
View Full Code Here

Examples of com.opensymphony.xwork2.config.providers.MockConfigurationProvider

        assertNull(action.getTheExistingMap().get("existingKey"));
    }

    public void testNonexistentParametersGetLoggedInDevMode() throws Exception {
        loadConfigurationProviders(new XmlConfigurationProvider("xwork-test-beans.xml"),
                new MockConfigurationProvider(Collections.singletonMap("devMode", "true")));
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("not_a_property", "There is no action property named like this");

        HashMap<String, Object> extraContext = new HashMap<String, Object>();
        extraContext.put(ActionContext.PARAMETERS, params);
View Full Code Here

Examples of com.opensymphony.xwork2.config.providers.MockConfigurationProvider

        assertTrue(actionMessage.contains("Error setting expression 'not_a_property' with value 'There is no action property named like this'"));
    }

    public void testNonexistentParametersAreIgnoredInProductionMode() throws Exception {
        loadConfigurationProviders(new XmlConfigurationProvider("xwork-test-beans.xml"),
                new MockConfigurationProvider(Collections.singletonMap("devMode", "false")));
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("not_a_property", "There is no action property named like this");

        HashMap<String, Object> extraContext = new HashMap<String, Object>();
        extraContext.put(ActionContext.PARAMETERS, params);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.