Search in sources :

Example 1 with ParseResult

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

the class FilterRowUtilsTest method parseEqualSymbolWithSpace.

@Test
public void parseEqualSymbolWithSpace() 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 2 with ParseResult

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

the class FilterRowUtilsTest method parseNotEqualSymbolWithSpace.

@Test
public void parseNotEqualSymbolWithSpace() 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 3 with ParseResult

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

the class FilterRowUtilsTest method parseLessThanSymbol.

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

Example 4 with ParseResult

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

the class FilterRowUtilsTest method parseLessThanSymbolWithoutSpace.

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

Example 5 with ParseResult

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

the class FilterRowUtilsTest method parseGreaterThanOrEqualSymbolWithSpace.

@Test
public void parseGreaterThanOrEqualSymbolWithSpace() 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)

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