Skip to content

Commit 3894d34

Browse files
Adjust test to respect expected inaccuracies
1 parent 871663e commit 3894d34

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/test/java/org/javawebstack/orm/test/TypesTest.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@
88
import org.javawebstack.orm.exception.ORMConfigurationException;
99
import org.junit.jupiter.api.Test;
1010

11+
import javax.swing.text.TabSet;
1112
import java.sql.Timestamp;
1213
import java.time.Instant;
1314

15+
import static org.javawebstack.orm.test.shared.util.TimestampUtil.diffInNanoseconds;
1416
import static org.junit.jupiter.api.Assertions.*;
1517

1618
public class TypesTest extends ORMTestCase {
@@ -58,10 +60,7 @@ public void testFields() throws ORMConfigurationException {
5860
assertEquals(model.exampleDouble, 123456789.1234567890D);
5961
assertEquals(model.exampleLong, 999999999999999999L);
6062
assertEquals(model.exampleLongPrimitive, 999999999999999999L);
61-
62-
// TODO: Use
63-
assertNotNull(model.timestampTest);
64-
63+
assertTrue(diffInNanoseconds(timestamp, model.timestampTest) < 1);
6564
model.exampleNull = "Text";
6665
model.save();
6766
model = Repo.get(ExampleModel.class).get(id);

0 commit comments

Comments
 (0)