use of com.seleniumtests.core.Filter in project seleniumRobot by bhecquet.
the class TestFilter method isEqual.
/**
******* EQUALS ************************
* Test if the parameters contain a Filter's name (key)
* EQUALS with the exact same value, then match is true.
*/
@Test(groups = { "ut" })
public void isEqual() {
Filter f = Filter.isEqual("isEqual", "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 notWrong.
/**
******* NOT ****************************
* Test if the match result is the opposite,
* NOT what the given Filter would output.
* i.e, true when it should be false
*/
@Test(groups = { "ut" })
public void notWrong() {
final Filter f1 = Filter.contains("contains", "whatever2");
Filter fNot = Filter.not(f1);
boolean result = fNot.match(parameters1);
Assert.assertEquals(result, true);
}
use of com.seleniumtests.core.Filter in project seleniumRobot by bhecquet.
the class TestFilter method in.
/*
* BETWEEN filters (number and date) not created yet.
*/
/**
******* IN *****************************
* Test if the parameters contain a Filter's name (key)
* IN with a value of the filter's array, then match is true
*/
@Test(groups = { "ut" })
public void in() {
String[] t = { "whatever1", "whatever2", "whatever3" };
Filter f = Filter.in("in", t);
boolean result = f.match(parameters1);
Assert.assertEquals(result, true);
}
use of com.seleniumtests.core.Filter in project seleniumRobot by bhecquet.
the class TestFilter method lessThanNumberSameF.
/**
******* LESS_THAN **********************
* Test if the parameters contain a Filter's name (key)
* LESS_THAN with the same Number value (than the filter), then match is false.
*/
@Test(groups = { "ut" })
public void lessThanNumberSameF() {
Filter f = Filter.lt("lessThanNumber", 5);
boolean result = f.match(parameters1);
Assert.assertEquals(result, false);
}
use of com.seleniumtests.core.Filter in project seleniumRobot by bhecquet.
the class TestFilter method lessThanNumberLowerF.
/**
******* LESS_THAN **********************
* Test if the parameters contain a Filter's name (key)
* LESS_THAN with a higher Number value (than the filter), then match is true.
*/
@Test(groups = { "ut" })
public void lessThanNumberLowerF() {
Filter f = Filter.lt("lessThanNumber", 4);
boolean result = f.match(parameters1);
Assert.assertEquals(result, false);
}
Aggregations