Package org.jbehave.core.exception

Examples of org.jbehave.core.exception.JBehaveFrameworkError


        if ( findProperty(properties, "behavioursClass")){
            return (Behaviours) newInstance(loadClass(getProperty(properties, "behavioursClass"), behavioursClassLoader));
        } else if ( findProperty(properties, "behaviourClass")){
            return new BehavioursAdapter(loadClass(getProperty(properties, "behaviourClass"), behavioursClassLoader));
        }
        throw new JBehaveFrameworkError("Could not load behaviours from properties "+properties);
    }
View Full Code Here


                properties.load(in);
                in.close();
            }
            return properties;
        } catch ( IOException e) {
            throw new JBehaveFrameworkError("Could not load JBehave properties - either from system or from jbehave.properties");
        }       
    }
View Full Code Here

    private static Class loadClass(String className, ClassLoader classLoader) {
        try {
            return classLoader.loadClass(className);
        } catch (ClassNotFoundException e) {
            throw new JBehaveFrameworkError("Could not load class for name " + className + " from classloader "+ classLoader);
        }
    }
View Full Code Here

   
    private static Object newInstance(Class instantiableClass) {
        try {
            return instantiableClass.newInstance();
        } catch ( Exception e) {
            throw new JBehaveFrameworkError("Could not instantiate class "+instantiableClass);
        }
    }
View Full Code Here

    private Object createInstance() {
        try {
            return classToVerify.newInstance();
        }
        catch (Exception e) {
            throw new JBehaveFrameworkError("Unable to create instance of " + classToVerify.getName(), e);
        }
    }
View Full Code Here

            }
            catch (InvocationTargetException e) {
                throw e.getTargetException();
            }
            catch (Exception e) {
                throw new JBehaveFrameworkError("Problem invoking " + method.getName());
            }
        }
        return null;
    }
View Full Code Here

        }
        catch (InvocationTargetException e) {
            listener.gotResult(new BehaviourMethodResult(this, e.getTargetException()));
        }
        catch (Throwable e) {
            throw new JBehaveFrameworkError("Problem verifying method " + method.getName(), e);
        }
    }
View Full Code Here

    private BehaviourMethod createBehaviourMethod(Object instance, String methodName) {
        try {
            Method method = instance.getClass().getMethod(methodName, null);
            return new BehaviourMethod(instance, method);
        } catch (Exception e) {
            throw new JBehaveFrameworkError("No method " + methodName + " on class " + instance.getClass().getName());
        }
    }
View Full Code Here

TOP

Related Classes of org.jbehave.core.exception.JBehaveFrameworkError

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.