File tree 1 file changed +8
-1
lines changed
src/test/java/io/tarantool/driver/mappers 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 2
2
3
3
import io .tarantool .driver .CustomTuple ;
4
4
import io .tarantool .driver .api .tuple .DefaultTarantoolTupleFactory ;
5
- import io .tarantool .driver .api .tuple .TarantoolTupleFactory ;
6
5
import io .tarantool .driver .api .tuple .TarantoolTuple ;
6
+ import io .tarantool .driver .api .tuple .TarantoolTupleFactory ;
7
7
import io .tarantool .driver .mappers .converters .ValueConverter ;
8
8
import org .junit .jupiter .api .Test ;
9
9
import org .msgpack .value .ArrayValue ;
13
13
import org .msgpack .value .ValueType ;
14
14
15
15
import java .math .BigDecimal ;
16
+ import java .time .Instant ;
17
+ import java .time .LocalDateTime ;
18
+ import java .time .ZoneOffset ;
16
19
import java .util .Arrays ;
17
20
import java .util .HashMap ;
18
21
import java .util .List ;
@@ -73,6 +76,10 @@ void getDefaultConverter() throws MessagePackValueMapperException {
73
76
UUID uuid = UUID .fromString ("84b56906-aeed-11ea-b3de-0242ac130004" );
74
77
assertEquals (uuid , mapper .fromValue (mapper .toValue (uuid )));
75
78
79
+ //instant
80
+ Instant instant = LocalDateTime .parse ("2022-10-25T12:03:58" ).toInstant (ZoneOffset .UTC );
81
+ assertEquals (instant , mapper .fromValue (mapper .toValue (instant )));
82
+
76
83
// null
77
84
assertEquals (ValueFactory .newNil (), mapper .toValue (null ));
78
85
}
You can’t perform that action at this time.
0 commit comments