Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/test/java/examples/simple/PersonMapperTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -957,6 +957,6 @@ void gh737() {
"where id = #{parameters.p2,jdbcType=INTEGER}";

assertThat(updateStatement.getUpdateStatement()).isEqualTo(expected);
assertThat(updateStatement.getParameters()).containsExactly(entry("p1", 4), entry("p2", 5));
assertThat(updateStatement.getParameters()).containsOnly(entry("p1", 4), entry("p2", 5));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ void testFunctionInSelect() {
.render(RenderingStrategies.MYBATIS3);

Map<String, Object> row = mapper.selectOneMappedRow(selectStatement);
assertThat(row).containsExactly(entry("FILE_ID", 1), entry("FILE_CONTENTS", randomBlob));
assertThat(row).containsOnly(entry("FILE_ID", 1), entry("FILE_CONTENTS", randomBlob));

selectStatement = select(fileId, toBase64(fileContents).as("checksum"))
.from(myfiles)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ void testWhereFragmentCollectorMerge() {
fc1.merge(fc2);

assertThat(fc1.collectFragments(Collectors.joining(","))).isEqualTo(":p1,:p2");
assertThat(fc1.parameters()).containsExactly(entry("p1", 1), entry("p2", 2));
assertThat(fc1.parameters()).containsOnly(entry("p1", 1), entry("p2", 2));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ void testOverrideFirstConnector() {
.render(RenderingStrategies.SPRING_NAMED_PARAMETER);

assertThat(whereClause).hasValueSatisfying(wc -> {
assertThat(wc.getParameters()).containsExactly(entry("p1", "fred"), entry("p2", "flintstone"));
assertThat(wc.getParameters()).containsOnly(entry("p1", "fred"), entry("p2", "flintstone"));
assertThat(wc.getWhereClause()).isEqualTo("where first_name = :p1 or last_name = :p2");
});
}
Expand Down Expand Up @@ -185,7 +185,7 @@ void testWhereExistsOr() {
"or exists (select * from person where id = :p2)";

assertThat(whereClause).hasValueSatisfying(wc -> {
assertThat(wc.getParameters()).containsExactly(entry("p1", 3), entry("p2", 4));
assertThat(wc.getParameters()).containsOnly(entry("p1", 3), entry("p2", 4));
assertThat(wc.getWhereClause()).isEqualTo(expected);
});
}
Expand Down Expand Up @@ -217,7 +217,7 @@ void testWhereExistsOrOr() {
"or exists (select * from person where id = :p3))";

assertThat(whereClause).hasValueSatisfying(wc -> {
assertThat(wc.getParameters()).containsExactly(entry("p1", 3), entry("p2", 4), entry("p3", 5));
assertThat(wc.getParameters()).containsOnly(entry("p1", 3), entry("p2", 4), entry("p3", 5));
assertThat(wc.getWhereClause()).isEqualTo(expected);
});
}
Expand All @@ -242,7 +242,7 @@ void testWhereExistsAnd() {
"and exists (select * from person where id = :p2)";

assertThat(whereClause).hasValueSatisfying(wc -> {
assertThat(wc.getParameters()).containsExactly(entry("p1", 3), entry("p2", 4));
assertThat(wc.getParameters()).containsOnly(entry("p1", 3), entry("p2", 4));
assertThat(wc.getWhereClause()).isEqualTo(expected);
});
}
Expand Down Expand Up @@ -274,7 +274,7 @@ void testWhereExistsAndAnd() {
"and exists (select * from person where id = :p3))";

assertThat(whereClause).hasValueSatisfying(wc -> {
assertThat(wc.getParameters()).containsExactly(entry("p1", 3), entry("p2", 4), entry("p3", 5));
assertThat(wc.getParameters()).containsOnly(entry("p1", 3), entry("p2", 4), entry("p3", 5));
assertThat(wc.getWhereClause()).isEqualTo(expected);
});
}
Expand Down Expand Up @@ -315,7 +315,7 @@ void testCollapsingCriteriaGroup3() {
String expected = "where first_name = :p1 or first_name = :p2";

assertThat(whereClause).hasValueSatisfying(wc -> {
assertThat(wc.getParameters()).containsExactly(entry("p1", "Fred"), entry("p2", "Betty"));
assertThat(wc.getParameters()).containsOnly(entry("p1", "Fred"), entry("p2", "Betty"));
assertThat(wc.getWhereClause()).isEqualTo(expected);
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,6 @@ open class KotlinElementsTest {
assertThat(updateStatement.updateStatement).isEqualTo(
"update Person set address_id = (address_id + :p1) where id = :p2"
)
assertThat(updateStatement.parameters).containsExactly(entry("p1", 4), entry("p2", 5))
assertThat(updateStatement.parameters).containsOnly(entry("p1", 4), entry("p2", 5))
}
}