Search in sources :

Example 16 with Filter

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

the class TestFilter method lessThanDateLowerF.

/**
 ******* LESS_THAN **********************
 * Test if the parameters contain a Filter's name (key)
 * LESS_THAN with a higher Date value (than the filter), then match is true.
 */
@Test(groups = { "ut" })
public void lessThanDateLowerF() {
    Date dateF = new Date();
    dateF = dateFromString(dateF, "05-30-2016");
    Filter f = Filter.lt("lessThanDate", dateF);
    boolean result = f.match(parameters1);
    Assert.assertEquals(result, false);
}
Also used : Filter(com.seleniumtests.core.Filter) Date(java.util.Date) Test(org.testng.annotations.Test) GenericTest(com.seleniumtests.GenericTest)

Example 17 with Filter

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

the class TestFilter method greaterThanNumberLowerF.

/**
 ******* GREATER_THAN *******************
 * Test if the parameters contain a Filter's name (key)
 * GREATER_THAN with a higher Number value (than the filter), then match is true.
 */
@Test(groups = { "ut" })
public void greaterThanNumberLowerF() {
    Filter f = Filter.greaterThan("greaterThanNumber", 4);
    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 18 with Filter

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

the class TestFilter method isEqualIgnoreCaseWrong.

/**
 ******* EQUALS_INGORE_CASE ************
 * Test if the parameters contain a Filter's name (key)
 * EQUALS_INGORE_CASE with the wrong value, then match is false.
 */
@Test(groups = { "ut" })
public void isEqualIgnoreCaseWrong() {
    Filter f = Filter.isEqualIgnoreCase("isEqualIngoreCase", "whatever2");
    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)

Example 19 with Filter

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

the class TestFilter method isEqualWrong.

/**
 ******* EQUALS ************************
 * Test if the parameters contain a Filter's name (key)
 * EQUALS with the wrong value, then match is false.
 */
@Test(groups = { "ut" })
public void isEqualWrong() {
    Filter f = Filter.isEqual("isEqual", "whatever2");
    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)

Example 20 with Filter

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

the class TestFilter method inCase.

/**
 ******* IN *****************************
 * Test if the parameters contain a Filter's name (key)
 * IN with a value of the filter's array, but with different case, is false
 */
@Test(groups = { "ut" })
public void inCase() {
    String[] t = { "whatever1", "WhatEver2", "whatever3" };
    Filter f = Filter.in("in", t);
    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