Package com.qspin.qtaste.ui.tools

Examples of com.qspin.qtaste.ui.tools.TestDataNode


            JTreeNode childFileNode = (JTreeNode)children[i];
            TristateCheckBox.State state = this.getNodeState(childFileNode, testbedName);
            if (state == TristateCheckBox.SELECTED) {
                if (childFileNode instanceof TestDataNode) {
                     for (int childIndex=0; childIndex < children.length; childIndex++) {
                         TestDataNode dataNode = (TestDataNode)children[childIndex];
                         if (getNodeState(dataNode, testbedName) == TristateCheckBox.SELECTED) {
                           writer.addCampaign(testbedName, parentNode.getFile().getPath().replace("\\", "/"), dataNode.getRowIndex());
                         }
                     }
                     // quit the loop because testdata already added and so children are testdata
                     break;
                }
                else
                {
                  writer.addCampaign(testbedName, childFileNode.getFile().getPath().replace("\\", "/"));
                }
            }
             if (state == TristateCheckBox.DONT_CARE) {
                 // check its children
                 //if children are testdata add specific node
                 Object[] childChildren = childFileNode.getChildren();
                 if (childChildren.length>0) {
                     // check if it's datarow
                     JTreeNode childDataNode = (JTreeNode)childChildren[0];
                     if (childDataNode instanceof TestDataNode) {
                         for (int childIndex=0; childIndex < childChildren.length; childIndex++) {
                             TestDataNode dataNode = (TestDataNode)childChildren[childIndex];
                             if (getNodeState(dataNode, testbedName) == TristateCheckBox.SELECTED)
                             {
                               writer.addCampaign(testbedName, childFileNode.getFile().getPath().replace("\\", "/"), dataNode.getRowIndex());
                             }
                         }
                     }
                     else
                         saveSelectedTestSuites(writer, childFileNode, testbedName);
View Full Code Here


                                            testDataTagFound = true;   
                                            rowSelector = childNode.getAttributes().getNamedItem("selector").getNodeValue();                       
                                            String[] rows = rowSelector.split(",");
                                            for (int rowIndex=0; rowIndex< rows.length; rowIndex++) {
                                            // update the testata nodes
                                            TestDataNode dataNode = new TestDataNode(new File(testDataFileName), testDataFileName, Integer.parseInt(rows[rowIndex]));
                                            this.setNodeState(dataNode, testbed, TristateCheckBox.SELECTED);
                                            updateParent(this.getTestSuite(addedNode, dataNode.getId()), testbed);
                                           
                                            }
                                        }
                                    }
                                    if (!testDataTagFound) {
View Full Code Here

                        fireAddTestSuite(childNode, childFileNode.getChildren());
                    }
                }
            }
            if (childNodes[i] instanceof TestDataNode) {
                TestDataNode childDataNode = (TestDataNode)childNodes[i];
                TCTreeNode childNode = new TCTreeNode(childDataNode, false);
                childDataNode.setShowTestdata(true);
                parentNode.add(childNode);
                this.fireTreeNodesInserted(this, this.getPathToRoot(parentNode), new int[] {i}, new Object [] {childNode});
               
            }
            
View Full Code Here

TOP

Related Classes of com.qspin.qtaste.ui.tools.TestDataNode

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.