QA-001 #15
+5
-4
@@ -77,7 +77,8 @@ class PatientRepositoryTest {
|
||||
assertEquals("0123 456789", loaded.phone1)
|
||||
assertEquals("0987 654321", loaded.phone2)
|
||||
assertNull(loaded.phone3)
|
||||
assertEquals(saved.createdAt, loaded.createdAt)
|
||||
// Die Datenbank speichert Millisekunden, upsert() liefert Instant.now() mit höherer Genauigkeit.
|
||||
assertEquals(saved.createdAt.toEpochMilli(), loaded.createdAt.toEpochMilli())
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -87,11 +88,11 @@ class PatientRepositoryTest {
|
||||
// createdAt im übergebenen Objekt wird bewusst ignoriert (Instant.EPOCH aus dem Helper).
|
||||
val second = repo.upsert(patient(lastName = "Musterfrau"))
|
||||
|
||||
assertEquals(first.createdAt, second.createdAt)
|
||||
assertTrue(second.updatedAt >= first.updatedAt)
|
||||
assertEquals(first.createdAt.toEpochMilli(), second.createdAt.toEpochMilli())
|
||||
assertTrue(second.updatedAt.toEpochMilli() >= first.updatedAt.toEpochMilli())
|
||||
val loaded = repo.getById("p-1")!!
|
||||
assertEquals("Musterfrau", loaded.lastName)
|
||||
assertEquals(first.createdAt, loaded.createdAt)
|
||||
assertEquals(first.createdAt.toEpochMilli(), loaded.createdAt.toEpochMilli())
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user