@@ -34,7 +34,7 @@ public void test() throws IOException {
34
34
TopLevelDocument document = TopLevelDocument .of (resource );
35
35
ObjectMapper objectMapper = JsonUtil .createObjectMapper ();
36
36
String json = objectMapper .writeValueAsString (document );
37
- String jsonRef = "{\" data\" :[{\" type\" :\" SUBSTATION\" ,\" id\" :\" S\" ,\" variantNum\" :0,\" attributes\" :{\" fictitious\" :false,\" country\" :\" FR\" }}],\" meta\" :{}}" ;
37
+ String jsonRef = "{\" data\" :[{\" type\" :\" SUBSTATION\" ,\" id\" :\" S\" ,\" parentNetwork \" :null, \" variantNum\" :0,\" attributes\" :{\" fictitious\" :false,\" country\" :\" FR\" }}],\" meta\" :{}}" ;
38
38
assertEquals (jsonRef , json );
39
39
TopLevelDocument document2 = objectMapper .readValue (json , TopLevelDocument .class );
40
40
assertEquals (resource , document2 .getData ().get (0 ));
@@ -51,7 +51,7 @@ public void testMultiResources() throws IOException {
51
51
TopLevelDocument document = TopLevelDocument .of (ImmutableList .of (resource , resource ));
52
52
ObjectMapper objectMapper = JsonUtil .createObjectMapper ();
53
53
String json = objectMapper .writeValueAsString (document );
54
- String jsonRef = "{\" data\" :[{\" type\" :\" SUBSTATION\" ,\" id\" :\" S\" ,\" variantNum\" :0,\" attributes\" :{\" fictitious\" :false,\" country\" :\" FR\" }},{\" type\" :\" SUBSTATION\" ,\" id\" :\" S\" ,\" variantNum\" :0,\" attributes\" :{\" fictitious\" :false,\" country\" :\" FR\" }}],\" meta\" :{}}" ;
54
+ String jsonRef = "{\" data\" :[{\" type\" :\" SUBSTATION\" ,\" id\" :\" S\" ,\" parentNetwork \" :null, \" variantNum\" :0,\" attributes\" :{\" fictitious\" :false,\" country\" :\" FR\" }},{\" type\" :\" SUBSTATION\" ,\" id\" :\" S\" , \" parentNetwork \" :null ,\" variantNum\" :0,\" attributes\" :{\" fictitious\" :false,\" country\" :\" FR\" }}],\" meta\" :{}}" ;
55
55
assertEquals (jsonRef , json );
56
56
TopLevelDocument document2 = objectMapper .readValue (json , TopLevelDocument .class );
57
57
assertEquals (2 , document2 .getData ().size ());
@@ -85,7 +85,7 @@ public void testGenerator() throws IOException {
85
85
TopLevelDocument document = TopLevelDocument .of (resourceGenerator );
86
86
ObjectMapper objectMapper = JsonUtil .createObjectMapper ();
87
87
String json = objectMapper .writeValueAsString (document );
88
- String jsonRef = "{\" data\" :[{\" type\" :\" GENERATOR\" ,\" id\" :\" gen1\" ,\" variantNum\" :0,\" attributes\" :{\" voltageLevelId\" :\" vl1\" ,\" name\" :\" name\" ,\" fictitious\" :false,\" node\" :1,\" bus\" :\" bus1\" ,\" energySource\" :\" HYDRO\" ,\" minP\" :2.0,\" maxP\" :1.0,\" voltageRegulatorOn\" :false,\" targetP\" :3.0,\" targetQ\" :0.0,\" targetV\" :4.0,\" ratedS\" :0.0,\" p\" :NaN,\" q\" :NaN,\" regulatingTerminal\" :{\" connectableId\" :\" idEq\" ,\" side\" :\" ONE\" }}}],\" meta\" :{}}" ;
88
+ String jsonRef = "{\" data\" :[{\" type\" :\" GENERATOR\" ,\" id\" :\" gen1\" ,\" parentNetwork \" :null, \" variantNum\" :0,\" attributes\" :{\" voltageLevelId\" :\" vl1\" ,\" name\" :\" name\" ,\" fictitious\" :false,\" node\" :1,\" bus\" :\" bus1\" ,\" energySource\" :\" HYDRO\" ,\" minP\" :2.0,\" maxP\" :1.0,\" voltageRegulatorOn\" :false,\" targetP\" :3.0,\" targetQ\" :0.0,\" targetV\" :4.0,\" ratedS\" :0.0,\" p\" :NaN,\" q\" :NaN,\" regulatingTerminal\" :{\" connectableId\" :\" idEq\" ,\" side\" :\" ONE\" }}}],\" meta\" :{}}" ;
89
89
assertEquals (jsonRef , json );
90
90
TopLevelDocument document2 = objectMapper .readValue (json , TopLevelDocument .class );
91
91
assertEquals (resourceGenerator , document2 .getData ().get (0 ));
0 commit comments