diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-10-07 11:25:10 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-10-07 11:25:10 +1300 |
commit | ea7d1c6268359221191d78bcbf0d65d2dcb06088 (patch) | |
tree | adad93c59f02f08ebb38977325f3baae01dc3da8 /test | |
parent | f8247b46234d7844d3692d5db2e35effab3ac603 (diff) | |
download | traccar-server-ea7d1c6268359221191d78bcbf0d65d2dcb06088.tar.gz traccar-server-ea7d1c6268359221191d78bcbf0d65d2dcb06088.tar.bz2 traccar-server-ea7d1c6268359221191d78bcbf0d65d2dcb06088.zip |
Implement pattern builder util class
Diffstat (limited to 'test')
-rw-r--r-- | test/org/traccar/helper/PatternBuilderTest.java | 14 |
1 files changed, 14 insertions, 0 deletions
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()); + } + +} |