Search in sources :

Example 6 with Filter

use of com.seleniumtests.core.Filter in project seleniumRobot by bhecquet.

the class TestFilter method orZero.

/**
 ******* OR *****************************
 * Test if the match result false,
 * if the 2 given Filters match false
 */
@Test(groups = { "ut" })
public void orZero() {
    final Filter f1 = Filter.contains("contains", "whatever3");
    final Filter f2 = Filter.contains("contains", "whatever2");
    Filter fOr = Filter.or(f1, f2);
    boolean result = fOr.match(parameters1);
    Assert.assertEquals(result, false);
}
Also used : Filter(com.seleniumtests.core.Filter) Test(org.testng.annotations.Test) GenericTest(com.seleniumtests.GenericTest)

Example 7 with Filter

use of com.seleniumtests.core.Filter in project seleniumRobot by bhecquet.

the class TestFilter method andTwo.

/*
     * START_WITH filter not created yet.
     */
/*
     * END_WITH filter not created yet.
     */
/**
 ******* AND ****************************
 * Test if the match result true,
 * if the 2 given Filters match true
 */
@Test(groups = { "ut" })
public void andTwo() {
    final Filter f1 = Filter.contains("contains", "whatever1");
    final Filter f2 = Filter.contains("contains", "whatnut");
    Filter fAnd = Filter.and(f1, f2);
    boolean result = fAnd.match(parameters1);
    Assert.assertEquals(result, true);
}
Also used : Filter(com.seleniumtests.core.Filter) Test(org.testng.annotations.Test) GenericTest(com.seleniumtests.GenericTest)

Example 8 with Filter

use of com.seleniumtests.core.Filter in project seleniumRobot by bhecquet.

the class TestFilter method andZero.

/**
 ******* AND ****************************
 * Test if the match result false,
 * if the 2 given Filters match false
 */
@Test(groups = { "ut" })
public void andZero() {
    final Filter f1 = Filter.contains("contains", "whatever3");
    final Filter f2 = Filter.contains("contains", "whatever2");
    Filter fAnd = Filter.and(f1, f2);
    boolean result = fAnd.match(parameters1);
    Assert.assertEquals(result, false);
}
Also used : Filter(com.seleniumtests.core.Filter) Test(org.testng.annotations.Test) GenericTest(com.seleniumtests.GenericTest)

Example 9 with Filter

use of com.seleniumtests.core.Filter in project seleniumRobot by bhecquet.

the class TestFilter method lessThanNumberHigherF.

/**
 ******* LESS_THAN **********************
 * Test if the parameters contain a Filter's name (key)
 * LESS_THAN with a lower Number value (than the filter), then match is true.
 */
@Test(groups = { "ut" })
public void lessThanNumberHigherF() {
    Filter f = Filter.lt("lessThanNumber", 6);
    boolean result = f.match(parameters1);
    Assert.assertEquals(result, true);
}
Also used : Filter(com.seleniumtests.core.Filter) Test(org.testng.annotations.Test) GenericTest(com.seleniumtests.GenericTest)

Example 10 with Filter

use of com.seleniumtests.core.Filter in project seleniumRobot by bhecquet.

the class TestFilter method greaterThanNumber.

/**
 ******* GREATER_THAN *******************
 * Test if the parameters contain a Filter's name (key)
 * GREATER_THAN with the same Number value (than the filter), then match is false.
 */
@Test(groups = { "ut" })
public void greaterThanNumber() {
    Filter f = Filter.greaterThan("greaterThanNumber", 5);
    boolean result = f.match(parameters1);
    Assert.assertEquals(result, false);
}
Also used : Filter(com.seleniumtests.core.Filter) Test(org.testng.annotations.Test) GenericTest(com.seleniumtests.GenericTest)

Aggregations

Filter (com.seleniumtests.core.Filter)34 GenericTest (com.seleniumtests.GenericTest)32 Test (org.testng.annotations.Test)32 Date (java.util.Date)3 CustomSeleniumTestsException (com.seleniumtests.customexception.CustomSeleniumTestsException)1 DatasetException (com.seleniumtests.customexception.DatasetException)1 FileInputStream (java.io.FileInputStream)1 IOException (java.io.IOException)1 InputStream (java.io.InputStream)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1