Skip to content

Commit d61651a

Browse files
committed
DATAJDBC-514 - Polishing.
Use AssertJ version specified by Spring Data Build. Original pull request: spring-projects/spring-data-r2dbc#295.
1 parent 7454032 commit d61651a

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
<properties>
2222
<dist.id>spring-data-jdbc</dist.id>
2323
<springdata.commons>2.3.0.BUILD-SNAPSHOT</springdata.commons>
24-
<assertj>3.6.2</assertj>
2524
<sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
2625

2726
<degraph-check.version>0.1.4</degraph-check.version>

spring-data-jdbc/src/test/java/org/springframework/data/jdbc/core/convert/DefaultDataAccessStrategyUnitTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ public void additionalParametersGetAddedToStatement() {
106106
verify(namedJdbcOperations).update(sqlCaptor.capture(), paramSourceCaptor.capture(), any(KeyHolder.class));
107107

108108
assertThat(sqlCaptor.getValue()) //
109-
.containsSequence("INSERT INTO \"DUMMY_ENTITY\" (", "\"ID\"", ") VALUES (", ":id", ")") //
110-
.containsSequence("INSERT INTO \"DUMMY_ENTITY\" (", "reference", ") VALUES (", ":reference", ")");
109+
.containsSubsequence("INSERT INTO \"DUMMY_ENTITY\" (", "\"ID\"", ") VALUES (", ":id", ")") //
110+
.containsSubsequence("INSERT INTO \"DUMMY_ENTITY\" (", "reference", ") VALUES (", ":reference", ")");
111111
assertThat(paramSourceCaptor.getValue().getValue("id")).isEqualTo(ORIGINAL_ID);
112112
}
113113

spring-data-jdbc/src/test/java/org/springframework/data/jdbc/core/convert/EntityRowMapperUnitTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ public void handlesMixedProperties() throws SQLException {
277277

278278
assertThat(extracted) //
279279
.extracting(e -> e.one, e -> e.two, e -> e.three) //
280-
.isEqualTo(new String[] { "111", "222", "333" });
280+
.containsSequence("111", "222", "333");
281281
}
282282

283283
@Test // DATAJDBC-273

spring-data-jdbc/src/test/java/org/springframework/data/jdbc/core/convert/SqlGeneratorUnitTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ public void updateWithVersion() {
351351

352352
SqlGenerator sqlGenerator = createSqlGenerator(VersionedEntity.class, AnsiDialect.INSTANCE);
353353

354-
assertThat(sqlGenerator.getUpdateWithVersion()).containsSequence( //
354+
assertThat(sqlGenerator.getUpdateWithVersion()).containsSubsequence( //
355355
"UPDATE", //
356356
"\"VERSIONED_ENTITY\"", //
357357
"SET", //
@@ -389,7 +389,7 @@ public void joinForOneToOneWithoutIdIncludesTheBackReferenceOfTheOuterJoin() {
389389

390390
String findAll = sqlGenerator.getFindAll();
391391

392-
assertThat(findAll).containsSequence("SELECT",
392+
assertThat(findAll).containsSubsequence("SELECT",
393393
"\"child\".\"PARENT_OF_NO_ID_CHILD\" AS \"CHILD_PARENT_OF_NO_ID_CHILD\"", "FROM");
394394
}
395395

@@ -398,7 +398,7 @@ public void update() {
398398

399399
SqlGenerator sqlGenerator = createSqlGenerator(DummyEntity.class, AnsiDialect.INSTANCE);
400400

401-
assertThat(sqlGenerator.getUpdate()).containsSequence( //
401+
assertThat(sqlGenerator.getUpdate()).containsSubsequence( //
402402
"UPDATE", //
403403
"\"DUMMY_ENTITY\"", //
404404
"SET", //

0 commit comments

Comments
 (0)