Skip to content

Commit 9ede590

Browse files
committed
Refactoring to remove a Sonar code smell
1 parent e3cb254 commit 9ede590

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/test/java/org/mybatis/dynamic/sql/InvalidSQLTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
import org.mybatis.dynamic.sql.update.UpdateDSL;
4848
import org.mybatis.dynamic.sql.update.UpdateModel;
4949
import org.mybatis.dynamic.sql.util.Messages;
50+
import org.mybatis.dynamic.sql.where.condition.IsEqualTo;
5051

5152
class InvalidSQLTest {
5253

@@ -253,8 +254,9 @@ void testInvalidMultipleWhereClauses() {
253254
.set(id).equalTo(3)
254255
.where(id, isEqualTo(2));
255256

257+
IsEqualTo<Integer> condition = isEqualTo(5);
256258
assertThatExceptionOfType(InvalidSqlException.class)
257-
.isThrownBy(() -> builder.where(id, isEqualTo(5)))
259+
.isThrownBy(() -> builder.where(id, condition))
258260
.withMessage(Messages.getString("ERROR.32"));
259261

260262
}

0 commit comments

Comments
 (0)