Search in sources :

Example 16 with DbStringFieldRule

use of com.axway.ats.rbv.db.rules.DbStringFieldRule 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 17 with DbStringFieldRule

use of com.axway.ats.rbv.db.rules.DbStringFieldRule 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 18 with DbStringFieldRule

use of com.axway.ats.rbv.db.rules.DbStringFieldRule 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 19 with DbStringFieldRule

use of com.axway.ats.rbv.db.rules.DbStringFieldRule in project ats-framework by Axway.

the class DbVerification method checkFieldValueRegexDoesNotMatch.

/**
     * Add rule to check that the value of the given field is not 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 checkFieldValueRegexDoesNotMatch(String tableName, String fieldName, String regex) {
    DbStringFieldRule matchingRule = new DbStringFieldRule(tableName, fieldName, regex, DbStringFieldRule.MatchRelation.REGEX_MATCH, "checkFieldValueRegexDoesNotMatch", false);
    matchingRule.setDbEncryptor(dbEncryptor);
    checkFieldValue(matchingRule);
}
Also used : DbStringFieldRule(com.axway.ats.rbv.db.rules.DbStringFieldRule) PublicAtsApi(com.axway.ats.common.PublicAtsApi)

Example 20 with DbStringFieldRule

use of com.axway.ats.rbv.db.rules.DbStringFieldRule in project ats-framework by Axway.

the class DbVerification method checkFieldValueDoesNotEqual.

/**
     * Add rule to check that the value of the given field is not 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 checkFieldValueDoesNotEqual(String tableName, String fieldName, String value) {
    DbStringFieldRule matchingRule = new DbStringFieldRule(tableName, fieldName, value, DbStringFieldRule.MatchRelation.EQUALS, "checkFieldValueDoesNotEqual", false);
    matchingRule.setDbEncryptor(dbEncryptor);
    checkFieldValue(matchingRule);
}
Also used : DbStringFieldRule(com.axway.ats.rbv.db.rules.DbStringFieldRule) PublicAtsApi(com.axway.ats.common.PublicAtsApi)

Aggregations

DbStringFieldRule (com.axway.ats.rbv.db.rules.DbStringFieldRule)64 Test (org.junit.Test)57 ArrayList (java.util.ArrayList)34 Monitor (com.axway.ats.rbv.Monitor)33 DbFieldsRule (com.axway.ats.rbv.db.rules.DbFieldsRule)33 SimpleMonitorListener (com.axway.ats.rbv.SimpleMonitorListener)32 BaseTest (com.axway.ats.rbv.BaseTest)24 MetaData (com.axway.ats.rbv.MetaData)17 DbMetaData (com.axway.ats.rbv.db.DbMetaData)15 SnapshotExecutor (com.axway.ats.rbv.executors.SnapshotExecutor)15 DbSearchTerm (com.axway.ats.rbv.db.DbSearchTerm)8 DbStorage (com.axway.ats.rbv.db.DbStorage)8 MockDbProvider (com.axway.ats.rbv.db.MockDbProvider)8 Matchable (com.axway.ats.rbv.storage.Matchable)8 PublicAtsApi (com.axway.ats.common.PublicAtsApi)7 PollingParameters (com.axway.ats.rbv.PollingParameters)3 AndRuleOperation (com.axway.ats.rbv.rules.AndRuleOperation)2 Rule (com.axway.ats.rbv.rules.Rule)1