Package com.qspin.qtaste.testsuite

Examples of com.qspin.qtaste.testsuite.QTasteTestFailException


    if ( mFoundComponent != null )
    {
      mFoundComponent.requestFocus();
      return mFoundComponent;
    }
    throw new QTasteTestFailException("The component \"" + name + "\" is not found.");
  }
View Full Code Here


  @Override
  protected void prepareActions() throws QTasteTestFailException {
    if ( !(component instanceof JTable) )
    {
      throw new QTasteTestFailException("The component is not a JTable.");
    }
    mColumnName = mData[2].toString();
    mColumnValue = mData[3].toString();
    mOccurence = Integer.parseInt(mData[4].toString());
    int columnIndex = getColumnIndex(mColumnName, ((JTable)component).getModel());
View Full Code Here

      if ( pColumnName.equals(pModel.getColumnName(columnIndex)) )
      {
        return columnIndex;
      }
    }
    throw new QTasteTestFailException("The column " + pColumnName + " is not found.");
  }
View Full Code Here

          return rowIndex;
     
        occurenceCounter ++;
      }
    }
    throw new QTasteTestFailException("Unable to find the occurence " + mOccurence + " of the value '" + mColumnValue + "' for the column '" + mColumnName + "'");
  }
View Full Code Here

  Integer executeCommand(Object... data) throws QTasteException {
    String componentName = data[1].toString();
    Component c = getComponentByName(componentName);
    if ( c == null || !(c instanceof JTable) )
    {
      throw new QTasteTestFailException("The component " + componentName + " is not a JTable.");
    }
    JTable table = (JTable)c;
    TableModel model = table.getModel();
    int columnIndex = getColumnIndex(data[2].toString(), model);
    return countRows(data[3].toString(), columnIndex, table);
View Full Code Here

      if ( pColumnName.equals(pModel.getColumnName(columnIndex)) )
      {
        return columnIndex;
      }
    }
    throw new QTasteTestFailException("The column " + pColumnName + " is not found.");
  }
View Full Code Here

  public Object executeCommand(Object... data) throws QTasteTestFailException {
    Robot bot = (Robot)data[0];
    int keycode = Integer.parseInt(data[1].toString());
    long delay = Long.parseLong(data[2].toString());
    if (bot == null)
      throw new QTasteTestFailException("JavaGUI cannot pressKey if java.awt.Robot is not available!");
    bot.keyPress(keycode);
    try {     
      Thread.sleep(delay);
    }
    catch (InterruptedException e) {
View Full Code Here

  protected void prepareActions() throws QTasteTestFailException {
    mIndex = Integer.parseInt(mData[2].toString());
    if (component instanceof JComboBox) {
      JComboBox combo = (JComboBox) component;
      if (combo.getItemCount() < mIndex) {
        throw new QTasteTestFailException("Specified index is out of bounds");
      }
    } else if (component instanceof JList) {
      JList list = (JList) component;
      if (list.getModel().getSize() < mIndex) {
        throw new QTasteTestFailException("Specified index is out of bounds");
      }
    } else {
      throw new QTasteTestFailException("Unsupported component");
    }
  }
View Full Code Here

      file.createNewFile();
      System.out.println("creating empty file");
      ImageIO.write(myImage, "jpg", file);              
    }
    catch (Exception e) {
      throw new QTasteTestFailException("Error saving snapshot " + mData[2].toString() + ":", e);
   
  }
View Full Code Here

                throw new QTasteDataException("Sleep has been interrupted while checking " + component + " property");
            }
        } while (true);

        if (possibleNotificationLoss) {
            throw new QTasteTestFailException(component + " property value cannot be checked because of a possible notification loss!");
        }

        if (foundMatching) {
            removePrecedingValues(property, lastCheckedTimestamp);
        } else {
            throw new QTasteTestFailException(component + " " + property + " property didn't behave as expected ('" + currentPropertyHistory + "' doesn't match expected '" + expectedValueOrTransition + "')");
        }
    }
View Full Code Here

TOP

Related Classes of com.qspin.qtaste.testsuite.QTasteTestFailException

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.