@@ -34,8 +34,7 @@ public class ImportSpecificationDeserializerActionTest {
3434
3535 @ Test
3636 void fails_if_actions_are_wrongly_typed () {
37- assertThatThrownBy (() -> deserialize (new StringReader (
38- """
37+ assertThatThrownBy (() -> deserialize (new StringReader ("""
3938 {
4039 "version": "1",
4140 "sources": [{
@@ -52,16 +51,14 @@ void fails_if_actions_are_wrongly_typed() {
5251 },
5352 "actions": 42
5453 }
55- """
56- .stripIndent ())))
54+ """ .stripIndent ())))
5755 .isInstanceOf (InvalidSpecificationException .class )
5856 .hasMessageContainingAll ("1 error(s)" , "0 warning(s)" , "$.actions: integer found, array expected" );
5957 }
6058
6159 @ Test
6260 void fails_if_action_in_array_is_wrongly_typed () {
63- assertThatThrownBy (() -> deserialize (new StringReader (
64- """
61+ assertThatThrownBy (() -> deserialize (new StringReader ("""
6562 {
6663 "version": "1",
6764 "sources": [{
@@ -78,16 +75,14 @@ void fails_if_action_in_array_is_wrongly_typed() {
7875 },
7976 "actions": [42]
8077 }
81- """
82- .stripIndent ())))
78+ """ .stripIndent ())))
8379 .isInstanceOf (InvalidSpecificationException .class )
8480 .hasMessageContainingAll ("1 error(s)" , "0 warning(s)" , "$.actions[0]: integer found, object expected" );
8581 }
8682
8783 @ Test
8884 void fails_if_action_active_attribute_is_wrongly_typed () {
89- assertThatThrownBy (() -> deserialize (new StringReader (
90- """
85+ assertThatThrownBy (() -> deserialize (new StringReader ("""
9186 {
9287 "version": "1",
9388 "sources": [{
@@ -110,17 +105,15 @@ void fails_if_action_active_attribute_is_wrongly_typed() {
110105 "query": "CREATE INDEX FOR (n:ANode) ON n.name"
111106 }]
112107 }
113- """
114- .stripIndent ())))
108+ """ .stripIndent ())))
115109 .isInstanceOf (InvalidSpecificationException .class )
116110 .hasMessageContainingAll (
117111 "1 error(s)" , "0 warning(s)" , "$.actions[0].active: integer found, boolean expected" );
118112 }
119113
120114 @ Test
121115 void fails_if_action_is_missing_type () {
122- assertThatThrownBy (() -> deserialize (new StringReader (
123- """
116+ assertThatThrownBy (() -> deserialize (new StringReader ("""
124117 {
125118 "version": "1",
126119 "sources": [{
@@ -141,16 +134,14 @@ void fails_if_action_is_missing_type() {
141134 "query": "CREATE INDEX FOR (n:ANode) ON n.name"
142135 }]
143136 }
144- """
145- .stripIndent ())))
137+ """ .stripIndent ())))
146138 .isInstanceOf (InvalidSpecificationException .class )
147139 .hasMessageContainingAll ("0 warning(s)" , "$.actions[0]: required property 'type' not found" );
148140 }
149141
150142 @ Test
151143 void fails_if_action_is_wrongly_typed () {
152- assertThatThrownBy (() -> deserialize (new StringReader (
153- """
144+ assertThatThrownBy (() -> deserialize (new StringReader ("""
154145 {
155146 "version": "1",
156147 "sources": [{
@@ -172,16 +163,14 @@ void fails_if_action_is_wrongly_typed() {
172163 "query": "CREATE INDEX FOR (n:ANode) ON n.name"
173164 }]
174165 }
175- """
176- .stripIndent ())))
166+ """ .stripIndent ())))
177167 .isInstanceOf (InvalidSpecificationException .class )
178168 .hasMessageContainingAll ("0 warning(s)" , "$.actions[0].type: integer found, string expected" );
179169 }
180170
181171 @ Test
182172 void fails_if_action_type_is_unsupported () {
183- assertThatThrownBy (() -> deserialize (new StringReader (
184- """
173+ assertThatThrownBy (() -> deserialize (new StringReader ("""
185174 {
186175 "version": "1",
187176 "sources": [{
@@ -203,16 +192,14 @@ void fails_if_action_type_is_unsupported() {
203192 "query": "CREATE INDEX FOR (n:ANode) ON n.name"
204193 }]
205194 }
206- """
207- .stripIndent ())))
195+ """ .stripIndent ())))
208196 .isInstanceOf (UndeserializableActionException .class )
209197 .hasMessageContaining ("Expected exactly one action provider for action of type foobar, but found: 0" );
210198 }
211199
212200 @ Test
213201 void fails_if_action_stage_is_wrongly_typed () {
214- assertThatThrownBy (() -> deserialize (new StringReader (
215- """
202+ assertThatThrownBy (() -> deserialize (new StringReader ("""
216203 {
217204 "version": "1",
218205 "sources": [{
@@ -234,16 +221,14 @@ void fails_if_action_stage_is_wrongly_typed() {
234221 "query": "CREATE INDEX FOR (n:ANode) ON n.name"
235222 }]
236223 }
237- """
238- .stripIndent ())))
224+ """ .stripIndent ())))
239225 .isInstanceOf (InvalidSpecificationException .class )
240226 .hasMessageContainingAll ("0 warning(s)" , "$.actions[0].stage: integer found, string expected" );
241227 }
242228
243229 @ Test
244230 void fails_if_action_stage_is_unsupported () {
245- assertThatThrownBy (() -> deserialize (new StringReader (
246- """
231+ assertThatThrownBy (() -> deserialize (new StringReader ("""
247232 {
248233 "version": "1",
249234 "sources": [{
@@ -265,8 +250,7 @@ void fails_if_action_stage_is_unsupported() {
265250 "query": "CREATE INDEX FOR (n:ANode) ON n.name"
266251 }]
267252 }
268- """
269- .stripIndent ())))
253+ """ .stripIndent ())))
270254 .isInstanceOf (InvalidSpecificationException .class )
271255 .hasMessageContainingAll (
272256 "1 error(s)" ,
@@ -277,8 +261,7 @@ void fails_if_action_stage_is_unsupported() {
277261
278262 @ Test
279263 void fails_if_cypher_action_execution_mode_is_wrongly_typed () {
280- assertThatThrownBy (() -> deserialize (new StringReader (
281- """
264+ assertThatThrownBy (() -> deserialize (new StringReader ("""
282265 {
283266 "version": "1",
284267 "sources": [{
@@ -301,17 +284,15 @@ void fails_if_cypher_action_execution_mode_is_wrongly_typed() {
301284 "execution_mode": 42
302285 }]
303286 }
304- """
305- .stripIndent ())))
287+ """ .stripIndent ())))
306288 .isInstanceOf (UndeserializableActionException .class )
307289 .hasMessageContaining (
308290 "Action provider org.neo4j.importer.v1.actions.plugin.CypherActionProvider failed to deserialize" );
309291 }
310292
311293 @ Test
312294 void fails_if_cypher_action_execution_mode_is_unsupported () {
313- assertThatThrownBy (() -> deserialize (new StringReader (
314- """
295+ assertThatThrownBy (() -> deserialize (new StringReader ("""
315296 {
316297 "version": "1",
317298 "sources": [{
@@ -334,8 +315,7 @@ void fails_if_cypher_action_execution_mode_is_unsupported() {
334315 "execution_mode": "foobar"
335316 }]
336317 }
337- """
338- .stripIndent ())))
318+ """ .stripIndent ())))
339319 .isInstanceOf (UndeserializableActionException .class )
340320 .hasMessageContaining (
341321 "Action provider org.neo4j.importer.v1.actions.plugin.CypherActionProvider failed to deserialize" );
0 commit comments