mirror of
https://github.com/traccar/traccar.git
synced 2025-01-08 11:47:49 +08:00
Enable unit tests
This commit is contained in:
parent
5505721ed5
commit
3feb9c15e3
@ -32,6 +32,7 @@ ext {
|
||||
jacksonVersion = "2.13.3" // same version as jersey-media-json-jackson dependency
|
||||
protobufVersion = "3.21.12"
|
||||
jxlsVersion = "2.12.0"
|
||||
junitVersion = "5.9.2"
|
||||
}
|
||||
|
||||
protobuf {
|
||||
@ -85,10 +86,15 @@ dependencies {
|
||||
implementation "com.hivemq:hivemq-mqtt-client:1.3.0"
|
||||
implementation "redis.clients:jedis:4.3.1"
|
||||
implementation "com.google.firebase:firebase-admin:9.1.1"
|
||||
testImplementation "org.junit.jupiter:junit-jupiter-api:5.9.2"
|
||||
testImplementation "org.junit.jupiter:junit-jupiter-api:$junitVersion"
|
||||
testImplementation "org.junit.jupiter:junit-jupiter-engine:$junitVersion"
|
||||
testImplementation "org.mockito:mockito-core:4.+"
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
||||
task copyDependencies(type: Copy) {
|
||||
into "$projectDir/target/lib"
|
||||
from configurations.runtimeClasspath
|
||||
|
@ -179,7 +179,7 @@ public class ProtocolTest extends BaseTest {
|
||||
if (expected.getFixTime() != null) {
|
||||
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
|
||||
dateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
|
||||
assertEquals("time", dateFormat.format(expected.getFixTime()), dateFormat.format(position.getFixTime()));
|
||||
assertEquals(dateFormat.format(expected.getFixTime()), dateFormat.format(position.getFixTime()), "time");
|
||||
}
|
||||
assertEquals(expected.getValid(), position.getValid(), "valid");
|
||||
assertEquals(expected.getLatitude(), position.getLatitude(), 0.00001, "latitude");
|
||||
|
Loading…
Reference in New Issue
Block a user