use of com.seleniumtests.core.Filter in project seleniumRobot by bhecquet.
the class TestFilter method containsIgnoreCase.
/**
******* CONTAINS_IGNORE_CASE *************
* Test if the parameters contain a Filter's name (key)
* CONTAINS_IGNORE_CASE with a value that contains the Filter's value,
* but with different case, then match is true
*/
@Test(groups = { "ut" })
public void containsIgnoreCase() {
Filter f = Filter.containsIgnoreCase("containsIgnoreCase", "WhatEver1");
boolean result = f.match(parameters1);
Assert.assertEquals(result, true);
}
use of com.seleniumtests.core.Filter in project seleniumRobot by bhecquet.
the class TestFilter method greaterThanNumberHigherF.
/*
* GREATER_THAN filter (date) not created yet.
*/
/**
******* GREATER_THAN *******************
* Test if the parameters contain a Filter's name (key)
* GREATER_THAN with a lower Number value (than the filter), then match is false.
*/
@Test(groups = { "ut" })
public void greaterThanNumberHigherF() {
Filter f = Filter.greaterThan("greaterThanNumber", 6);
boolean result = f.match(parameters1);
Assert.assertEquals(result, false);
}
use of com.seleniumtests.core.Filter in project seleniumRobot by bhecquet.
the class TestFilter method wrongName.
/**
* Test if the parameters do not contain a Filter's name (key)
*/
@Test(groups = { "ut" })
public void wrongName() {
Filter f = Filter.isEqual("equals", "whatever1");
boolean result = f.match(parameters1);
Assert.assertEquals(result, false);
}
use of com.seleniumtests.core.Filter in project seleniumRobot by bhecquet.
the class TestFilter method lessThanDateSameF.
/**
******* LESS_THAN **********************
* Test if the parameters contain a Filter's name (key)
* LESS_THAN with the same Date value (than the filter), then match is false.
*/
@Test(groups = { "ut" })
public void lessThanDateSameF() {
Date dateF = new Date();
dateF = dateFromString(dateF, "06-30-2016");
Filter f = Filter.lt("lessThanDate", dateF);
boolean result = f.match(parameters1);
Assert.assertEquals(result, false);
}
use of com.seleniumtests.core.Filter in project seleniumRobot by bhecquet.
the class TestFilter method not.
/*
* IS_NULL filter not created yet.
*/
/**
******* NOT ****************************
* Test if the match result is the opposite,
* NOT what the given Filter would output.
* i.e, false when it should be true
*/
@Test(groups = { "ut" })
public void not() {
final Filter f1 = Filter.contains("contains", "whatever1");
Filter fNot = Filter.not(f1);
boolean result = fNot.match(parameters1);
Assert.assertEquals(result, false);
}
Aggregations