Package net.mindengine.galen.runner

Examples of net.mindengine.galen.runner.CombinedListener


    public void execute(GalenArguments arguments) throws Exception {
        if (arguments.getAction() != null) {
           
            FailureListener failureListener = new FailureListener();
            CombinedListener combinedListener = createListeners(arguments);
            combinedListener.add(failureListener);
            if (listener != null) {
                combinedListener.add(listener);
            }
           
            if ("test".equals(arguments.getAction())) {
                runTests(arguments, combinedListener);
            }
            else if ("check".equals(arguments.getAction())) {
                performCheck(arguments, combinedListener);
            }
            else if ("config".equals(arguments.getAction())) {
                performConfig();
            }
            else if ("dump".equals(arguments.getAction())) {
                performPageDump(arguments);
            }
            combinedListener.done();
           
            if (GalenConfig.getConfig().getUseFailExitCode()){
                if (failureListener.hasFailures()) {
                    System.exit(1);
                }
View Full Code Here


            System.out.println("Config file already exists");
        }
    }

    private CombinedListener createListeners(GalenArguments arguments) throws IOException, SecurityException, IllegalArgumentException, ClassNotFoundException, NoSuchMethodException, InstantiationException, IllegalAccessException, InvocationTargetException {
        CombinedListener combinedListener = new CombinedListener();
        combinedListener.add(new ConsoleReportingListener(System.out, System.out));
       
        //Adding all user defined listeners
        List<CompleteListener> configuredListeners = getConfiguredListeners();
        for (CompleteListener configuredListener : configuredListeners) {
            combinedListener.add(configuredListener);
        }
        return combinedListener;
    }
View Full Code Here

TOP

Related Classes of net.mindengine.galen.runner.CombinedListener

Copyright © 2018 www.massapicom. 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.