1
1
package org.ga4gh.vmckotlin
2
2
3
+ import com.fasterxml.jackson.databind.SerializationFeature
4
+ import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule
3
5
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
4
6
import org.junit.jupiter.api.Assertions.*
5
7
import org.junit.jupiter.api.Disabled
@@ -12,7 +14,13 @@ import java.time.OffsetDateTime
12
14
internal class ModelTest {
13
15
14
16
val mapper = jacksonObjectMapper()
15
- val prettyMapper = jacksonObjectMapper().writerWithDefaultPrettyPrinter()
17
+ .registerModule(JavaTimeModule ())
18
+ .configure(SerializationFeature .WRITE_DATES_AS_TIMESTAMPS , false )
19
+
20
+ val prettyMapper = jacksonObjectMapper()
21
+ .registerModule(JavaTimeModule ())
22
+ .configure(SerializationFeature .WRITE_DATES_AS_TIMESTAMPS , false )
23
+ .writerWithDefaultPrettyPrinter()
16
24
17
25
/* *
18
26
* In a real working code situation this will be doing a lookup against the biocommons.seqrepo
@@ -42,6 +50,31 @@ internal class ModelTest {
42
50
43
51
val meta = Meta (OffsetDateTime .parse(" 2017-06-07T06:13:59.38Z" ), " 0" )
44
52
53
+ @Test
54
+ fun testIdentifier () {
55
+ println (chr19GRCh38Identifier.getId())
56
+
57
+
58
+
59
+ // "VMC:GL_9Jht-lguk_jnBvG-wLJbjmBw5v_v7rQo": [
60
+ // {
61
+ // "accession": "rs429358"
62
+ // }
63
+ // ],
64
+ // "VMC:GL_LStELzYmlIQP3Zan9FhibgiFGAgSM7CI": [
65
+ // {
66
+ // "accession": "rs7412"
67
+ // }
68
+ // ],
69
+ // "VMC:GS_IIB53T8CNeJJdUqzn9V_JnRtQadwWCbl": [
70
+ // {
71
+ // "accession": "NC_000019.10",
72
+ // "namespace": "NCBI"
73
+ // }
74
+ // ]
75
+
76
+ }
77
+
45
78
@Test
46
79
fun testInterval () {
47
80
assertEquals(" <Interval:44908683:44908684>" , rs429358Interval.toVmc())
@@ -118,10 +151,5 @@ internal class ModelTest {
118
151
)
119
152
println (prettyMapper.writeValueAsString(vmcBundle))
120
153
}
121
- // "VMC:GS_IIB53T8CNeJJdUqzn9V_JnRtQadwWCbl": [
122
- // {
123
- // "accession": "NC_000019.10",
124
- // "namespace": "NCBI"
125
- // }
126
154
127
155
}
0 commit comments