diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-10-24 22:57:38 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-10-24 22:57:38 +1300 |
commit | 5538a83ac7eda6ad5775e582688dd0199e6c538c (patch) | |
tree | 7b261a5e9767fd807124c868d2c4a5d72315e7df /test/org/traccar | |
parent | be1baf2b062587099171b485ac1e3f591034816f (diff) | |
download | trackermap-server-5538a83ac7eda6ad5775e582688dd0199e6c538c.tar.gz trackermap-server-5538a83ac7eda6ad5775e582688dd0199e6c538c.tar.bz2 trackermap-server-5538a83ac7eda6ad5775e582688dd0199e6c538c.zip |
Refactor pattern builder class
Diffstat (limited to 'test/org/traccar')
-rw-r--r-- | test/org/traccar/helper/PatternBuilderTest.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/org/traccar/helper/PatternBuilderTest.java b/test/org/traccar/helper/PatternBuilderTest.java index a36481934..427161758 100644 --- a/test/org/traccar/helper/PatternBuilderTest.java +++ b/test/org/traccar/helper/PatternBuilderTest.java @@ -7,8 +7,9 @@ public class PatternBuilderTest { @Test public void testPatternBuilder() { - Assert.assertEquals("\\$GPRMC", new PatternBuilder().txt("$GPRMC").toString()); - Assert.assertEquals("(\\d{2}\\.\\p{XDigit}+)", new PatternBuilder().num("(dd.x+)").toString()); + Assert.assertEquals("\\$GPRMC", new PatternBuilder().text("$GPRMC").toString()); + Assert.assertEquals("(\\d{2}\\.\\p{XDigit}+)", new PatternBuilder().number("(dd.x+)").toString()); + Assert.assertEquals("a(?:bc)?", new PatternBuilder().text("a").text("b").text("c").optional(2).toString()); } } |