cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ntimof...@apache.org
Subject cayenne git commit: CAY-2447 Crypto support for LocalDateTime minor test fix
Date Wed, 15 Aug 2018 12:19:34 GMT
Repository: cayenne
Updated Branches:
  refs/heads/master 669b60dea -> 36faff575


CAY-2447 Crypto support for LocalDateTime
  minor test fix


Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/36faff57
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/36faff57
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/36faff57

Branch: refs/heads/master
Commit: 36faff5750169a914b4d08c25ebf6b8186c17277
Parents: 669b60d
Author: Nikita Timofeev <stariy95@gmail.com>
Authored: Wed Aug 15 15:17:57 2018 +0300
Committer: Nikita Timofeev <stariy95@gmail.com>
Committed: Wed Aug 15 15:17:57 2018 +0300

----------------------------------------------------------------------
 .../crypto/transformer/value/LocalDateTimeConverterTest.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/36faff57/cayenne-crypto/src/test/java/org/apache/cayenne/crypto/transformer/value/LocalDateTimeConverterTest.java
----------------------------------------------------------------------
diff --git a/cayenne-crypto/src/test/java/org/apache/cayenne/crypto/transformer/value/LocalDateTimeConverterTest.java
b/cayenne-crypto/src/test/java/org/apache/cayenne/crypto/transformer/value/LocalDateTimeConverterTest.java
index aeeb5ce..490afa9 100644
--- a/cayenne-crypto/src/test/java/org/apache/cayenne/crypto/transformer/value/LocalDateTimeConverterTest.java
+++ b/cayenne-crypto/src/test/java/org/apache/cayenne/crypto/transformer/value/LocalDateTimeConverterTest.java
@@ -43,15 +43,15 @@ public class LocalDateTimeConverterTest {
     @Test
     public void testToBytesBig() {
         byte[] bytes = LocalDateTimeConverter.INSTANCE
-                .toBytes(LocalDateTime.of(123456, 12, 31, 23, 59, 59));
-        assertArrayEquals(new byte[]{4, 2, -91, 16, -9, 0, 0, 78, -108, 85, -76, 54, 0},
bytes);
+                .toBytes(LocalDateTime.MAX);
+        assertArrayEquals(new byte[]{8, 0, 0, 0, 85, 10, 27, 72, -9, 0, 0, 78, -108, -111,
78, -1, -1}, bytes);
     }
 
     @Test
     public void testFromBytesBig() {
         LocalDateTime localDateTime = LocalDateTimeConverter.INSTANCE
-                .fromBytes(new byte[]{4, 2, -91, 16, -9, 0, 0, 78, -108, 85, -76, 54, 0});
-        assertEquals(LocalDateTime.of(123456, 12, 31, 23, 59, 59), localDateTime);
+                .fromBytes(new byte[]{8, 0, 0, 0, 85, 10, 27, 72, -9, 0, 0, 78, -108, -111,
78, -1, -1});
+        assertEquals(LocalDateTime.MAX, localDateTime);
     }
 
     @Test


Mime
View raw message