Fix tests
This commit is contained in:
parent
15477ccdfa
commit
a45110c8de
2 changed files with 2 additions and 2 deletions
|
@ -20,7 +20,7 @@ class GradeDateDeserializer : JsonAdapter<GradeDate?>() {
|
||||||
val dateAsString = value?.toString()
|
val dateAsString = value?.toString()
|
||||||
return synchronized(reader) {
|
return synchronized(reader) {
|
||||||
GradeDate::class.java.getDeclaredConstructor().newInstance().apply {
|
GradeDate::class.java.getDeclaredConstructor().newInstance().apply {
|
||||||
time = dateAsString?.toDate(SERVER_FORMAT)?.time ?: 0
|
time = (dateAsString ?: "01.01.1970").toDate(SERVER_FORMAT).time
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -340,7 +340,7 @@ class GradesTest : BaseLocalTest() {
|
||||||
assertEquals("Rodzaje broni chemicznych", description)
|
assertEquals("Rodzaje broni chemicznych", description)
|
||||||
assertEquals("5,00", weight)
|
assertEquals("5,00", weight)
|
||||||
assertEquals(5.0, weightValue, .0)
|
assertEquals(5.0, weightValue, .0)
|
||||||
assertEquals(getDate(1970, 1, 1, 1, 0, 0), date)
|
assertEquals(getDate(1970, 1, 1, 0, 0, 0), date)
|
||||||
assertEquals("Weronika Ratajczak", teacher)
|
assertEquals("Weronika Ratajczak", teacher)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue