aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/helper
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-10-24 22:57:38 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-10-24 22:57:38 +1300
commit5538a83ac7eda6ad5775e582688dd0199e6c538c (patch)
tree7b261a5e9767fd807124c868d2c4a5d72315e7df /test/org/traccar/helper
parentbe1baf2b062587099171b485ac1e3f591034816f (diff)
downloadtrackermap-server-5538a83ac7eda6ad5775e582688dd0199e6c538c.tar.gz
trackermap-server-5538a83ac7eda6ad5775e582688dd0199e6c538c.tar.bz2
trackermap-server-5538a83ac7eda6ad5775e582688dd0199e6c538c.zip
Refactor pattern builder class
Diffstat (limited to 'test/org/traccar/helper')
-rw-r--r--test/org/traccar/helper/PatternBuilderTest.java5
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());
}
}