From 5538a83ac7eda6ad5775e582688dd0199e6c538c Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 24 Oct 2015 22:57:38 +1300 Subject: Refactor pattern builder class --- test/org/traccar/helper/PatternBuilderTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'test') 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()); } } -- cgit v1.2.3