Search in sources :

Example 11 with ParseResult

use of org.eclipse.nebula.widgets.nattable.filterrow.ParseResult in project nebula.widgets.nattable by eclipse.

the class FilterRowUtilsTest method parseWithoutThresholdSymbols.

@Test
public void parseWithoutThresholdSymbols() throws Exception {
    ParseResult result = FilterRowUtils.parse("100", NULL_DELIMITER, TextMatchingMode.REGULAR_EXPRESSION).get(0);
    assertEquals(MatchType.NONE, result.getMatchOperation());
    assertEquals("100", result.getValueToMatch());
}
Also used : ParseResult(org.eclipse.nebula.widgets.nattable.filterrow.ParseResult) Test(org.junit.Test)

Example 12 with ParseResult

use of org.eclipse.nebula.widgets.nattable.filterrow.ParseResult in project nebula.widgets.nattable by eclipse.

the class FilterRowUtilsTest method parseEqualSymbol.

@Test
public void parseEqualSymbol() throws Exception {
    ParseResult result = FilterRowUtils.parse("=100", NULL_DELIMITER, TextMatchingMode.REGULAR_EXPRESSION).get(0);
    assertEquals(MatchType.EQUAL, result.getMatchOperation());
    assertEquals("100", result.getValueToMatch());
}
Also used : ParseResult(org.eclipse.nebula.widgets.nattable.filterrow.ParseResult) Test(org.junit.Test)

Example 13 with ParseResult

use of org.eclipse.nebula.widgets.nattable.filterrow.ParseResult in project nebula.widgets.nattable by eclipse.

the class FilterRowUtilsTest method parseNotEqualSymbol.

@Test
public void parseNotEqualSymbol() throws Exception {
    ParseResult result = FilterRowUtils.parse("<>100", NULL_DELIMITER, TextMatchingMode.REGULAR_EXPRESSION).get(0);
    assertEquals(MatchType.NOT_EQUAL, result.getMatchOperation());
    assertEquals("100", result.getValueToMatch());
}
Also used : ParseResult(org.eclipse.nebula.widgets.nattable.filterrow.ParseResult) Test(org.junit.Test)

Example 14 with ParseResult

use of org.eclipse.nebula.widgets.nattable.filterrow.ParseResult in project nebula.widgets.nattable by eclipse.

the class FilterRowUtilsTest method parseGreaterThanOrEqualSymbol.

@Test
public void parseGreaterThanOrEqualSymbol() throws Exception {
    ParseResult result = FilterRowUtils.parse(">= 100", NULL_DELIMITER, TextMatchingMode.REGULAR_EXPRESSION).get(0);
    assertEquals(MatchType.GREATER_THAN_OR_EQUAL, result.getMatchOperation());
    assertEquals("100", result.getValueToMatch());
}
Also used : ParseResult(org.eclipse.nebula.widgets.nattable.filterrow.ParseResult) Test(org.junit.Test)

Example 15 with ParseResult

use of org.eclipse.nebula.widgets.nattable.filterrow.ParseResult in project nebula.widgets.nattable by eclipse.

the class FilterRowUtilsTest method parseLessThanOrEqualSymbol.

@Test
public void parseLessThanOrEqualSymbol() throws Exception {
    ParseResult result = FilterRowUtils.parse("<=100", NULL_DELIMITER, TextMatchingMode.REGULAR_EXPRESSION).get(0);
    assertEquals(MatchType.LESS_THAN_OR_EQUAL, result.getMatchOperation());
    assertEquals("100", result.getValueToMatch());
}
Also used : ParseResult(org.eclipse.nebula.widgets.nattable.filterrow.ParseResult) Test(org.junit.Test)

Aggregations

ParseResult (org.eclipse.nebula.widgets.nattable.filterrow.ParseResult)17 Test (org.junit.Test)14 BasicEventList (ca.odell.glazedlists.BasicEventList)1 CompositeMatcherEditor (ca.odell.glazedlists.matchers.CompositeMatcherEditor)1 MatcherEditor (ca.odell.glazedlists.matchers.MatcherEditor)1 TextMatcherEditor (ca.odell.glazedlists.matchers.TextMatcherEditor)1 ThresholdMatcherEditor (ca.odell.glazedlists.matchers.ThresholdMatcherEditor)1 Comparator (java.util.Comparator)1 Scanner (java.util.Scanner)1 Pattern (java.util.regex.Pattern)1 PatternSyntaxException (java.util.regex.PatternSyntaxException)1 IDisplayConverter (org.eclipse.nebula.widgets.nattable.data.convert.IDisplayConverter)1 MatchType (org.eclipse.nebula.widgets.nattable.filterrow.ParseResult.MatchType)1 TextMatchingMode (org.eclipse.nebula.widgets.nattable.filterrow.TextMatchingMode)1 Ignore (org.junit.Ignore)1