Search in sources :

Example 26 with PublicAtsApi

use of com.axway.ats.common.PublicAtsApi in project ats-framework by Axway.

the class ImapVerification method checkRegexInAttachment.

/**
     * Check that the nested IMAP message contains the specified regular expression in the given attachment part
     *
     * @param searchRegex       the regular expression to search for
     * @param attachmentIndex   the index of the attachment in the MIME structure (regular parts are skipped)
     * @param nestedPackagePath path to the nested message
     */
@PublicAtsApi
public void checkRegexInAttachment(String searchRegex, int attachmentIndex, int... nestedPackagePath) {
    //create the rule
    StringInMimePartRule stringInPartRule = new StringInMimePartRule(nestedPackagePath, searchRegex, true, attachmentIndex, true, "checkRegexgInAttachment" + getNestedMimePackagePathDescription(nestedPackagePath), true);
    rootRule.addRule(stringInPartRule);
}
Also used : StringInMimePartRule(com.axway.ats.rbv.imap.rules.StringInMimePartRule) PublicAtsApi(com.axway.ats.common.PublicAtsApi)

Example 27 with PublicAtsApi

use of com.axway.ats.common.PublicAtsApi in project ats-framework by Axway.

the class DbVerification method checkFieldValueEquals.

/**
     * Add rule to check that the value of the given field is the same as the given one
     *
     * @param tableName     the name of the table which the field is part of
     * @param fieldName     the field to check
     * @param value         the value expected (string)
     */
@PublicAtsApi
public void checkFieldValueEquals(String tableName, String fieldName, String value) {
    DbStringFieldRule matchingRule = new DbStringFieldRule(tableName, fieldName, value, DbStringFieldRule.MatchRelation.EQUALS, "checkFieldValueEquals", true);
    matchingRule.setDbEncryptor(dbEncryptor);
    checkFieldValue(matchingRule);
}
Also used : DbStringFieldRule(com.axway.ats.rbv.db.rules.DbStringFieldRule) PublicAtsApi(com.axway.ats.common.PublicAtsApi)

Example 28 with PublicAtsApi

use of com.axway.ats.common.PublicAtsApi in project ats-framework by Axway.

the class DbVerification method checkFieldValueRegex.

/**
     * Add rule to check that the value of the given field is matched by the given regular expressions
     *
     * @param tableName     the name of the table which the field is part of
     * @param fieldName     the field to check
     * @param regex
     */
@PublicAtsApi
public void checkFieldValueRegex(String tableName, String fieldName, String regex) {
    DbStringFieldRule matchingRule = new DbStringFieldRule(tableName, fieldName, regex, DbStringFieldRule.MatchRelation.REGEX_MATCH, "checkFieldValueRegex", true);
    matchingRule.setDbEncryptor(dbEncryptor);
    checkFieldValue(matchingRule);
}
Also used : DbStringFieldRule(com.axway.ats.rbv.db.rules.DbStringFieldRule) PublicAtsApi(com.axway.ats.common.PublicAtsApi)

Example 29 with PublicAtsApi

use of com.axway.ats.common.PublicAtsApi in project ats-framework by Axway.

the class DbVerification method checkFieldValueContains.

/**
     * Add rule to check that the value of the given field contains the given string
     *
     * @param tableName     the name of the table which the field is part of
     * @param fieldName     the field to check
     * @param value         the string that should be contained in the field
     */
@PublicAtsApi
public void checkFieldValueContains(String tableName, String fieldName, String value) {
    DbStringFieldRule matchingRule = new DbStringFieldRule(tableName, fieldName, value, DbStringFieldRule.MatchRelation.CONTAINS, "checkFieldValueContains", true);
    matchingRule.setDbEncryptor(dbEncryptor);
    checkFieldValue(matchingRule);
}
Also used : DbStringFieldRule(com.axway.ats.rbv.db.rules.DbStringFieldRule) PublicAtsApi(com.axway.ats.common.PublicAtsApi)

Example 30 with PublicAtsApi

use of com.axway.ats.common.PublicAtsApi in project ats-framework by Axway.

the class DbVerification method checkFieldValueDateBefore.

/**
     * Add rule to check that the given timestamp is before the date contained in the given field
     *
     * @param tableName     the name of the table which the field is part of
     * @param fieldName     the field to check
     * @param timestamp     the expected timestamp (UNIX timestamp format)
     * @param datePattern   the pattern in which the date is stored in the field - see <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html">Java date patterns</a>
     */
@PublicAtsApi
public void checkFieldValueDateBefore(String tableName, String fieldName, long timestamp, String datePattern) {
    DbDateFieldRule matchingRule = new DbDateFieldRule(tableName, fieldName, Long.toString(timestamp), DbDateFieldRule.MatchRelation.BEFORE_DATE, datePattern, "checkFieldValueDateBefore", true);
    checkFieldValue(matchingRule);
}
Also used : DbDateFieldRule(com.axway.ats.rbv.db.rules.DbDateFieldRule) PublicAtsApi(com.axway.ats.common.PublicAtsApi)

Aggregations

PublicAtsApi (com.axway.ats.common.PublicAtsApi)409 Validator (com.axway.ats.core.validation.Validator)66 SwingElementState (com.axway.ats.uiengine.utilities.swing.SwingElementState)60 WebElement (org.openqa.selenium.WebElement)57 IFileSystemOperations (com.axway.ats.core.filesystem.model.IFileSystemOperations)44 HiddenHtmlElementState (com.axway.ats.uiengine.utilities.hiddenbrowser.HiddenHtmlElementState)32 NoSuchMimePackageException (com.axway.ats.action.objects.model.NoSuchMimePackageException)31 PackageException (com.axway.ats.action.objects.model.PackageException)31 RealHtmlElementState (com.axway.ats.uiengine.utilities.realbrowser.html.RealHtmlElementState)31 MessagingException (javax.mail.MessagingException)31 VerificationException (com.axway.ats.uiengine.exceptions.VerificationException)24 ArrayList (java.util.ArrayList)18 SeleniumOperationException (com.axway.ats.uiengine.exceptions.SeleniumOperationException)16 UiElementException (com.axway.ats.uiengine.exceptions.UiElementException)16 IOException (java.io.IOException)16 JTableFixture (org.fest.swing.fixture.JTableFixture)16 Actions (org.openqa.selenium.interactions.Actions)16 NotSupportedOperationException (com.axway.ats.uiengine.exceptions.NotSupportedOperationException)15 VerifyNotEqualityException (com.axway.ats.uiengine.exceptions.VerifyNotEqualityException)15 XMLException (com.axway.ats.common.xml.XMLException)14