From ea7d1c6268359221191d78bcbf0d65d2dcb06088 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Wed, 7 Oct 2015 11:25:10 +1300 Subject: Implement pattern builder util class --- test/org/traccar/helper/PatternBuilderTest.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 test/org/traccar/helper/PatternBuilderTest.java (limited to 'test/org') diff --git a/test/org/traccar/helper/PatternBuilderTest.java b/test/org/traccar/helper/PatternBuilderTest.java new file mode 100644 index 000000000..a36481934 --- /dev/null +++ b/test/org/traccar/helper/PatternBuilderTest.java @@ -0,0 +1,14 @@ +package org.traccar.helper; + +import org.junit.Assert; +import org.junit.Test; + +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()); + } + +} -- cgit v1.2.3