Examples of TestConfig


Examples of org.apache.myfaces.mc.test.core.annotation.TestConfig

        servletContext.addInitParameter("javax.faces.PARTIAL_STATE_SAVING", "true");
        servletContext.addInitParameter(ViewHandler.FACELETS_REFRESH_PERIOD_PARAM_NAME,"-1");
        servletContext.addInitParameter("org.apache.myfaces.config.annotation.LifecycleProvider",
            NoInjectionAnnotationLifecycleProvider.class.getName());
       
        TestConfig testConfig = getTestJavaClass().getAnnotation(TestConfig.class);
        if (testConfig != null && testConfig.oamAnnotationScanPackages() != null &&
            testConfig.oamAnnotationScanPackages().length() > 0)
        {
            servletContext.addInitParameter("org.apache.myfaces.annotation.SCAN_PACKAGES",
                testConfig.oamAnnotationScanPackages());
        }

        List<FrameworkMethod> setupWebConfigParamMethods = testClass.getAnnotatedMethods(SetupWebConfigParams.class);
        if (setupWebConfigParamMethods != null && !setupWebConfigParamMethods.isEmpty())
        {
View Full Code Here

Examples of org.apache.myfaces.mc.test.core.annotation.TestConfig

     *
     * @return
     */
    protected String getWebappResourcePath()
    {
        TestConfig testConfig = getTestJavaClass().getAnnotation(TestConfig.class);
        if (testConfig != null && testConfig.webappResourcePath() != null &&
            !"testClassResourcePackage".equals(testConfig.webappResourcePath()))
        {
            return testConfig.webappResourcePath();
        }
        return getTestJavaClass().getName().substring(0,
                getTestJavaClass().getName().lastIndexOf('.')).replace('.', '/')
                + "/";
    }
View Full Code Here

Examples of org.apache.myfaces.mc.test.core.annotation.TestConfig

     *
     * @return
     */
    protected ExpressionFactory createExpressionFactory()
    {
        TestConfig testConfig = getTestJavaClass().getAnnotation(TestConfig.class);
        if (testConfig != null && testConfig.expressionFactory() != null &&
            testConfig.expressionFactory().length() > 0)
        {
            return (ExpressionFactory) ClassUtils.newInstance(
                testConfig.expressionFactory(), ExpressionFactory.class);
        }
        return new MockExpressionFactory();
    }
View Full Code Here

Examples of org.apache.myfaces.mc.test.core.annotation.TestConfig

     *
     * @return
     */
    protected boolean isScanAnnotations()
    {
        TestConfig testConfig = getTestJavaClass().getAnnotation(TestConfig.class);
        if (testConfig != null)
        {
            return testConfig.scanAnnotations();
        }
        return false;
    }
View Full Code Here

Examples of org.apache.myfaces.mc.test.core.annotation.TestConfig

        //session = null;
    }
   
    protected String getContextPath()
    {
        TestConfig testConfig = getTestJavaClass().getAnnotation(TestConfig.class);
        if (testConfig != null)
        {
            return testConfig.contextPath();
        }
        return "/test";
    }
View Full Code Here

Examples of org.apache.myfaces.mc.test.core.annotation.TestConfig

        return "/test";
    }
   
    protected String getServletPath()
    {
        TestConfig testConfig = getTestJavaClass().getAnnotation(TestConfig.class);
        if (testConfig != null)
        {
            return testConfig.servletPath();
        }
        return "/faces";
    }
View Full Code Here

Examples of org.vfny.geoserver.config.validation.TestConfig

*/
public class ValidationTest extends TestCase {

//  public static void main(String[] args) {
  public void test() {
    TestConfig testConfig = new TestConfig();
    PlugInConfig pluginConfig = new PlugInConfig();
    // the plugin to test the bean info for.
    //pluginConfig.setClassName(PolygonBoundaryCoveredByPolygonValidation.class.getName());
    pluginConfig.setClassName(GazetteerNameValidation.class.getName());
    testConfig.setPlugIn(pluginConfig);

    System.out.println(testConfig.toString());
    System.out.println("--------------------------------------");
    for (int i = 0; i < testConfig.getPropertyDescriptors().length; i++) {
     
      System.out.println(testConfig.getPropertyDescriptors()[i].getClass().getName());
      System.out.println(testConfig.getPropertyDescriptors()[i].getDisplayName());
      System.out.println(testConfig.getPropertyDescriptors()[i].getShortDescription());
     
      System.out.println(testConfig.getPropertyDescriptors()[i].attributeNames());
      System.out.println("--------------------------------------");
    }

    System.out.println("--------------------------------------");
    System.out.println("--------------------------------------");
    System.out.println("--------------------------------------");
   
   
    testConfig = new TestConfig();
    pluginConfig = new PlugInConfig();
    // the plugin to test the bean info for.
    //pluginConfig.setClassName(PolygonBoundaryCoveredByPolygonValidation.class.getName());
    pluginConfig.setClassName(GazetteerNameValidation.class.getName());
    testConfig.setPlugIn(pluginConfig);

    PropertyDescriptor [] pd = pluginConfig.getPropertyDescriptors();
   
    System.out.println(pluginConfig.toString());
    System.out.println("--------------------------------------");
View Full Code Here

Examples of org.vfny.geoserver.config.validation.TestConfig

*/
public class ValidationTest extends TestCase {

//  public static void main(String[] args) {
  public void test() {
    TestConfig testConfig = new TestConfig();
    PlugInConfig pluginConfig = new PlugInConfig();
    // the plugin to test the bean info for.
    //pluginConfig.setClassName(PolygonBoundaryCoveredByPolygonValidation.class.getName());
    pluginConfig.setClassName(GazetteerNameValidation.class.getName());
    testConfig.setPlugIn(pluginConfig);

    System.out.println(testConfig.toString());
    System.out.println("--------------------------------------");
    for (int i = 0; i < testConfig.getPropertyDescriptors().length; i++) {
     
      System.out.println(testConfig.getPropertyDescriptors()[i].getClass().getName());
      System.out.println(testConfig.getPropertyDescriptors()[i].getDisplayName());
      System.out.println(testConfig.getPropertyDescriptors()[i].getShortDescription());
     
      System.out.println(testConfig.getPropertyDescriptors()[i].attributeNames());
      System.out.println("--------------------------------------");
    }

    System.out.println("--------------------------------------");
    System.out.println("--------------------------------------");
    System.out.println("--------------------------------------");
   
   
    testConfig = new TestConfig();
    pluginConfig = new PlugInConfig();
    // the plugin to test the bean info for.
    //pluginConfig.setClassName(PolygonBoundaryCoveredByPolygonValidation.class.getName());
    pluginConfig.setClassName(GazetteerNameValidation.class.getName());
    testConfig.setPlugIn(pluginConfig);

    PropertyDescriptor [] pd = pluginConfig.getPropertyDescriptors();
   
    System.out.println(pluginConfig.toString());
    System.out.println("--------------------------------------");
View Full Code Here

Examples of org.vfny.geoserver.config.validation.TestConfig

        ServletContext context = this.getServlet().getServletContext();
        ValidationConfig validationConfig = (ValidationConfig) context.getAttribute(ValidationConfig.CONFIG_KEY);
        TestSuiteConfig suiteConfig = (TestSuiteConfig) request.getSession().getAttribute(TestSuiteConfig.CURRENTLY_SELECTED_KEY);
       
        if (edit.equals(buttonAction)) {
            TestConfig testConfig = (TestConfig) suiteConfig.getTests().get(selectedTest);
            request.getSession().setAttribute(TestConfig.CURRENTLY_SELECTED_KEY, testConfig);
           
            return mapping.findForward("validationTestEditor");           
        } else if (delete.equals(buttonAction)) {
           
View Full Code Here

Examples of org.vfny.geoserver.config.validation.TestConfig

        String newName = form.getNewName();
        String selectedPlugIn = form.getSelectedPlugIn();
       
        PlugInConfig plugIn = validationConfig.getPlugIn(selectedPlugIn);
       
        TestConfig testConfig = new TestConfig();
        testConfig.setName(newName);
        testConfig.setPlugIn(plugIn);
        testConfig.setArgs(new HashMap());
       
        TestSuiteConfig suiteConfig = (TestSuiteConfig) request.getSession().getAttribute(TestSuiteConfig.CURRENTLY_SELECTED_KEY);
        suiteConfig.addTest(testConfig);
        getApplicationState().notifyConfigChanged();
       
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.