Package com.canoo.webtest.engine

Examples of com.canoo.webtest.engine.StepFailedException


    long maxElapsedTimeMillis = getMaxElapsedMillis();
    LOG.debug("Max Time Allowed (millis): " + maxElapsedTimeMillis);
    LOG.debug("Time Taken (millis): " + getDuration());
    if (getDuration() > maxElapsedTimeMillis) {
      throw new StepFailedException("Group took " + getDuration() +
         " ms to execute but maximum allowed was " + maxElapsedTimeMillis + " ms", this);
    }
    notifySuccess(); // TODO: what is this doing here, it's already in Step#execute()
  }
View Full Code Here


        sb.append(permission.getName());
        sb.append(" is ");
        if (expectedValue)
          sb.append("not ");
        sb.append("set");
        throw new StepFailedException(sb.toString(), this);
      }
    }
    }
View Full Code Here

        final int part = ConversionUtil.convertToInt(getPartIndex(), 0);
        if (content instanceof Multipart) {
            final Multipart mp = (Multipart) content;
            if (part >= mp.getCount()) {
                throw new StepFailedException("PartIndex too large.", this);
            }
            final BodyPart bodyPart = mp.getBodyPart(part);
            final String disp = bodyPart.getDisposition();
            if (Part.ATTACHMENT.equals(disp)) {
                return bodyPart.getFileName();
            }
            throw new StepFailedException("No filename for inline Message Part.", this);
        }
        return getSimpleMessageFilename((String) content, part);
    }
View Full Code Here

                    return line.substring(lastSpace + 1);
                }
                count++;
            }
        }
        throw new StepFailedException("No matching part found.", this);
    }
View Full Code Here

  protected void verifyPdf(final PDFPage pdfPage)
  {
        final int actualStrength = pdfPage.getEncryptionStrength();
        if (actualStrength != getStrength())
          throw new StepFailedException("Incorrect document encryption strength found",
              getStrength(), actualStrength);
  }
View Full Code Here

        emailContextCheck();
    }

    private void emailContextCheck() {
        if (!getContext().containsKey("EmailConfigInfo")) {
            throw new StepFailedException("No previous emailSetConfig!", this);
        }
    }
View Full Code Here

    private void checkFormat(final String property, final String expected, final String actual) {
        if (expected == null || verifyStrings(expected, actual)) {
            return;
        }
        throw new StepFailedException("Wrong cell style found for property '"+property+"' in cell "+
                getCellReferenceStr(), expected, actual, this);
    }
View Full Code Here

  protected void verifyPdf(final PDFPage pdfPage)
  {
    if (pdfPage.isEncrypted() != getEncrypted())
    {
        final String desc = "Document is " + (getEncrypted() ? " not" : "") + "encrypted";
      throw new StepFailedException(desc, this);
    }

    if (getUserPassword() != null)
      {
        if (!pdfPage.isUserPassword(getUserPassword()))
          throw new StepFailedException("Wrong user password >" + getUserPassword() + "<", this);
      }

      if (getOwnerPassword() != null)
      {
        if (!pdfPage.isOwnerPassword(getOwnerPassword()))
          throw new StepFailedException("Wrong owner password >" + getOwnerPassword() + "<", this);
      }
  }
View Full Code Here

        try {
            folder = getHelper().getInboxFolder(configInfo);
            setWebtestProperty(getProperty(), processContent(folder), getPropertyType());
        }
        catch (final MessagingException e) {
            throw new StepFailedException("Error processing content: " + e.getMessage(), this);
        }
        finally {
            getHelper().logout(folder, false);
        }
    }
View Full Code Here

            if (currentStep.getDescription() != null)
            {
              message.append(": ");
              message.append(currentStep.getDescription());
            }
            throw new StepFailedException(message.toString(), this);
        }
    }
View Full Code Here

TOP

Related Classes of com.canoo.webtest.engine.StepFailedException

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.