diff options
Diffstat (limited to 'test/org/traccar/helper/ChecksumTest.java')
-rw-r--r-- | test/org/traccar/helper/ChecksumTest.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/org/traccar/helper/ChecksumTest.java b/test/org/traccar/helper/ChecksumTest.java new file mode 100644 index 000000000..c87692ce8 --- /dev/null +++ b/test/org/traccar/helper/ChecksumTest.java @@ -0,0 +1,16 @@ +package org.traccar.helper; + +import org.junit.Assert; +import org.junit.Test; + +public class ChecksumTest { + + @Test + public void testLuhnChecksum() { + + Assert.assertEquals(7, Checksum.luhnChecksum(12345678901234L)); + Assert.assertEquals(0, Checksum.luhnChecksum(63070019470771L)); + + } + +} |