Package com.technophobia.substeps.model

Examples of com.technophobia.substeps.model.StepImplementation


        // TODO - handle ignores ?
        if (isStepMethod(m)) {
            final String stepValue = stepValueFrom(m);

            final StepImplementation impl = StepImplementation.parse(stepValue, loadedClass, m);
            Assert.assertNotNull("unable to resolve the keyword / method for: " + stepValue + " in class: "
                    + loadedClass, impl);

            syntax.addStepImplementation(impl);
        }
View Full Code Here


        final List<StepImplementation> list = this.parameters.getSyntax().checkForStepImplementations(
                step.getKeyword(), step.getParameterLine(), step.getSource(), step.getSourceLineNumber());

        if (list != null && !list.isEmpty()) {
            final StepImplementation problem = list.get(0);

            // we've got a step implementation that matches a parent
            // step, ie a step that has substeps
            // fail immediately or mark as parse error

            final String msg = "line: [" + step.getParameterLine() + "] in [" + step.getSource()
                    + "] matches step implementation method: [" + problem.getMethod().toString()
                    + "] AND matches a sub step definition: [" + substepsParent.getParent().getParameterLine()
                    + "] in [" + substepsParent.getSubStepFile() + "]";

            throw new SubstepsConfigurationException(msg);
View Full Code Here

        if (parent != null && parent.getParamValueMap() != null) {
            step.setParameterLine(substitutePlaceholders(step.getLine(), parent.getParamValueMap().getParameters()));
        }

        final StepImplementation execImpl = pickImplToExecute(step);

        if (execImpl != null) {

            final StepImplementationNode stepImplementationNode = new StepImplementationNode(
                    execImpl.getImplementedIn(), execImpl.getMethod(), tags, depth);

            stepImplementationNode.setLine(step.getParameterLine());
            stepImplementationNode.setFileUri(step.getSource().getAbsolutePath());
            stepImplementationNode.setLineNumber(step.getSourceLineNumber());
View Full Code Here

        }
    }

    private StepImplementation pickImplToExecute(final Step step) {

        StepImplementation impl = null;

        // using the specified 'phrase' look for a corresponding impl

        final List<StepImplementation> list = this.parameters.getSyntax().getStepImplementations(step.getKeyword(),
                step.getParameterLine(), step.getSource(), step.getSourceLineNumber());
View Full Code Here

                        + getClass().getName() + ".originalMethod and " + getClass().getName() + ".duplicatingMethod"));
    }

    private StepImplementation stepImplementation(final String methodName) throws NoSuchMethodException,
            SecurityException {
        return new StepImplementation(getClass(), "keyword", "test-pattern", getClass().getMethod(methodName));
    }
View Full Code Here

TOP

Related Classes of com.technophobia.substeps.model.StepImplementation

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.