Search in sources :

Example 11 with Filter

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

the class TestFilter method containsCase.

/**
 ******* CONTAINS ************************
 * Test if the parameters contain a Filter's name (key)
 * CONTAINS with a value that contains the Filter's value,
 * but with different case, then match is false
 */
@Test(groups = { "ut" })
public void containsCase() {
    Filter f = Filter.contains("contains", "wWhatEver1");
    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 12 with Filter

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

the class TestFilter method orOne.

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

Example 13 with Filter

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

the class TestFilter method containsIgnoreCaseWrong.

/**
 ******* CONTAINS_IGNORE_CASE *************
 * Test if the parameters contain a Filter's name (key)
 * CONTAINS_IGNORE_CASE with a value that does not contain
 * the Filter's value, then match is false
 */
@Test(groups = { "ut" })
public void containsIgnoreCaseWrong() {
    Filter f = Filter.containsIgnoreCase("containsIgnoreCase", "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 14 with Filter

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

the class TestFilter method isEqualCase.

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

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

the class TestFilter method containsWrong.

/**
 ******* CONTAINS ************************
 * Test if the parameters contain a Filter's name (key)
 * CONTAINS with a value that does not contain the Filter's value, then match is false
 */
@Test(groups = { "ut" })
public void containsWrong() {
    Filter f = Filter.contains("contains", "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)

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