use of com.seleniumtests.core.Filter in project seleniumRobot by bhecquet.
the class TestFilter method inWrong.
/**
******* IN *****************************
* Test if the parameters contain a Filter's name (key)
* IN without a value of the filter's array, then match is false
*/
@Test(groups = { "ut" })
public void inWrong() {
//
String[] t = { "whatever1", "whatever3" };
Filter f = Filter.in("in", t);
boolean result = f.match(parameters1);
Assert.assertEquals(result, false);
}
use of com.seleniumtests.core.Filter in project seleniumRobot by bhecquet.
the class TestFilter method contains.
/**
******* CONTAINS ************************
* Test if the parameters contain a Filter's name (key)
* CONTAINS with a value that contains the Filter's value, then match is true
*/
@Test(groups = { "ut" })
public void contains() {
Filter f = Filter.contains("contains", "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 lessThanDateHigherF.
/**
******* LESS_THAN **********************
* Test if the parameters contain a Filter's name (key)
* LESS_THAN with a lower Date value (than the filter), then match is true.
*/
@Test(groups = { "ut" })
public void lessThanDateHigherF() {
Date dateF = new Date();
dateF = dateFromString(dateF, "07-30-2016");
Filter f = Filter.lt("lessThanDate", dateF);
boolean result = f.match(parameters1);
Assert.assertEquals(result, true);
}
use of com.seleniumtests.core.Filter in project seleniumRobot by bhecquet.
the class TestSpreadSheetHelper method testgetEntitiesWithFilterFromSpreadSheet.
/**
* Test read Entities from CSV file (no headers), with filter: select line containing "jaune".
* @throws Exception
*/
@Test(groups = { "ut" })
public void testgetEntitiesWithFilterFromSpreadSheet() throws Exception {
Filter filter = Filter.contains("test;test2", "jaune");
Iterator<Object[]> dataIterator = SpreadSheetHelper.getEntitiesFromSpreadsheet(null, null, "src/test/resources/ti/excel/test.csv", filter);
Assert.assertTrue(dataIterator.next()[0].equals("jaune;vert"));
Assert.assertFalse(dataIterator.hasNext());
}
Aggregations