Package testGenerator.testMethodModel

Examples of testGenerator.testMethodModel.TestPath


            this.currLevel = level;
        }
        //Case where we continue on with part of old branch
        else if (level == this.currLevel)
        {
            TestPath oldBranch = new TestPath();
            for (TestCondition cond : this.currBranch.conditions)
            {
                oldBranch.conditions.add(cond);
            }
            this.currBranchList.add(oldBranch);

            //Remove last condtion so we have room for alternate branch
            this.currBranch.conditions.remove(this.currBranch.conditions.size() - 1);

            //Add new condtion
            this.currBranch.conditions.add(testCondition);

        }
        else
        {
            //Keep reference of last branch
            TestPath lastBranch = currBranch;

            //Save the current branch
            this.currBranchList.add(currBranch);

            //Create a new branch
            this.currBranch = new TestPath();

            //Add back in the last branch conds
            for (int i = 0; i < level; i++)
            {
                this.currBranch.conditions.add(lastBranch.conditions.get(i));
View Full Code Here


        //Input constructor
        JLabel constLabel = new JLabel("instance = ");
        panel.add(constLabel);

        TestPath currBranch = this.controller.getCurrTestPath();

        if (currBranch.constructor.equals(""))
        {
            currBranch.constructor = "new " + this.controller.getClassName() + "();";
        }
View Full Code Here

        {

            @Override
            public void actionPerformed(ActionEvent e)
            {
                TestPath newBranch = new TestPath();
                tableModel.addBranch(newBranch);
            }
        };

    }
View Full Code Here

            public void actionPerformed(ActionEvent evt)
            {
                int selectedRow = table.getSelectedRow();
                if (selectedRow != -1)
                {
                    TestPath branch = tableModel.getBranchAtRow(selectedRow);
                    controller.setCurrBranch(branch);
                    guiControl.showTestCreator();
                }
                else
                {
View Full Code Here

            {
                int selectedRow = table.getSelectedRow();
                if (evt.getClickCount() == 2)
                {
                    //TODO Remove duplicate code
                    TestPath branch = tableModel.getBranchAtRow(selectedRow);
                    controller.setCurrBranch(branch);
                    guiControl.showTestCreator();
                }
            }
        };
View Full Code Here

    @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)
        {
            return rowIndex + 1;
        }
        else if (columnIndex == getLargestNumberOfTestConditons() + 1)
        {
            return currBranch.getStatus(method);
        }
        //Case where we have found a branch smaller than largest
        else if (columnIndex >= testConditions.size() + 1)
        {
            return " ------ ";
View Full Code Here

        return controller.getCurrMethod().testBranches.get(selectedRow);
    }

    public void duplicateBranchAtRow(int selectedRow)
    {
        TestPath currBranch = controller.getCurrMethod().testBranches.get(selectedRow);

        try
        {
            controller.getCurrMethod().testBranches.add((TestPath) currBranch.clone());
            this.fireTableStructureChanged();
        }
        catch (Exception error)
        {
            error.printStackTrace();
View Full Code Here

        methods = new ArrayList<AutoJUnitMethod>();
        currMethod = new AutoJUnitMethod();
        sourceLoc = "";
        testSetup = "";
        testTearDown = "";
        currentBranch = new TestPath();
        testHeader = "";
        className = "";
    }
View Full Code Here

TOP

Related Classes of testGenerator.testMethodModel.TestPath

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.