Package testGenerator.testMethodModel

Examples of testGenerator.testMethodModel.AutoJUnitMethod


    }

    private AutoJUnitMethod getNonVoidMethod()
    {
        //Construct non void method
        AutoJUnitMethod nonVoid = new AutoJUnitMethod();
        nonVoid.returnType = "int";
        nonVoid.name = "nonVoidMethod";
        nonVoid.params.add(new ParamBinding("int", "var1"));
        nonVoid.params.add(new ParamBinding("int", "var2"));
View Full Code Here


    }

    private AutoJUnitMethod getNonVoidStaticMethod()
    {
        //Construct non void method
        AutoJUnitMethod nonVoid = new AutoJUnitMethod();
        nonVoid.addModifier("static");
        nonVoid.returnType = "int";
        nonVoid.name = "nonVoidMethod";
        nonVoid.params.add(new ParamBinding("int", "var1"));
        nonVoid.params.add(new ParamBinding("int", "var2"));
View Full Code Here

    }

    private AutoJUnitMethod getVoidStaticMethod()
    {
        //Construct void method
        AutoJUnitMethod voidMethod = new AutoJUnitMethod();
        voidMethod.addModifier("static");
        voidMethod.returnType = "void";
        voidMethod.name = "voidMethod";
        voidMethod.params.add(new ParamBinding("int", "var1"));
        voidMethod.params.add(new ParamBinding("int", "var2"));
View Full Code Here

    }

    public void reset()
    {
        //Reset the current method
        currMethod = new AutoJUnitMethod();
        //Reset the current level
        currLevel = -1;
        //Create a new branch
        this.currBranchList = new ArrayList<TestPath>();
        //Create a new params list
View Full Code Here

    public BranchGraphManipulator(ListenableDirectedMultigraph<String, org.jgrapht.graph.DefaultEdge> g, JGraphModelAdapter<String, org.jgrapht.graph.DefaultEdge> jgAdapter, Controller controller)
    {
        this.g = g;
        this.jgAdapter = jgAdapter;
        AutoJUnitMethod currMethod = controller.getCurrMethod();
        testBranches = currMethod.testBranches;

        buildView();
    }
View Full Code Here

        }
    }

    private boolean isShowConstructor()
    {
        AutoJUnitMethod currMethod = this.controller.getCurrMethod();
        return !currMethod.hasModifier("static") && !currMethod.isConstructor();
    }
View Full Code Here

        return !currMethod.hasModifier("static") && !currMethod.isConstructor();
    }

    private boolean isShowReturnValue()
    {
        AutoJUnitMethod currMethod = this.controller.getCurrMethod();
        return !currMethod.isVoidMethod() && !currMethod.isConstructor();
    }
View Full Code Here

        return !this.controller.getCurrMethod().hasModifier("static");
    }

    private boolean isShowAdditionalConstraints()
    {
        AutoJUnitMethod currMethod = this.controller.getCurrMethod();
        return !currMethod.hasModifier("static");
    }
View Full Code Here

     * @return
     */
    @Override
    public Object getValueAt(int rowIndex, int columnIndex)
    {
        AutoJUnitMethod method = this.controller.getCurrMethod();
        ArrayList<TestPath> branches = method.testBranches;
        TestPath currBranch = branches.get(rowIndex);
        ArrayList<TestCondition> testConditions = currBranch.conditions;

        if (columnIndex == 0)
View Full Code Here

     * @return
     */
    @Override
    public int getRowCount()
    {
        AutoJUnitMethod method = this.controller.getCurrMethod();
        ArrayList<TestPath> branches = method.testBranches;
        return branches.size();
    }
View Full Code Here

TOP

Related Classes of testGenerator.testMethodModel.AutoJUnitMethod

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.