add GlobalDbConfig

This commit is contained in:
Looly
2020-07-15 17:29:39 +08:00
parent e50942efbc
commit 84c38aa3f0
8 changed files with 91 additions and 14 deletions

View File

@@ -32,4 +32,13 @@ public class CrcTest {
crc.update(16);
Assert.assertEquals("cc04", HexUtil.toHex(crc.getValue()));
}
@Test
public void crc16Test2() {
String str = "QN=20160801085857223;ST=23;CN=2011;PW=123456;MN=010000A8900016F000169DC0;Flag=5;CP=&&DataTime=20160801085857; LA-Rtd=50.1&&";
CRC16 crc = new CRC16();
crc.update(str.getBytes(), 0, str.getBytes().length);
String crc16 = HexUtil.toHex(crc.getValue());
Assert.assertEquals("18c", crc16);
}
}