This is an automated email from the ASF dual-hosted git repository.

jianglongtao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new 136ca671c83 Refactor WhereSegmentBinderTest (#30874)
136ca671c83 is described below

commit 136ca671c83df5ba0e762eade7904070887e2270
Author: yx9o <[email protected]>
AuthorDate: Sat Apr 13 13:32:20 2024 +0800

    Refactor WhereSegmentBinderTest (#30874)
---
 .../infra/binder/segment/where/WhereSegmentBinderTest.java       | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git 
a/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/segment/where/WhereSegmentBinderTest.java
 
b/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/segment/where/WhereSegmentBinderTest.java
index 1cd5d93a9a3..1e5631e768b 100644
--- 
a/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/segment/where/WhereSegmentBinderTest.java
+++ 
b/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/segment/where/WhereSegmentBinderTest.java
@@ -21,12 +21,13 @@ import 
org.apache.shardingsphere.infra.binder.segment.from.TableSegmentBinderCon
 import 
org.apache.shardingsphere.infra.binder.statement.SQLStatementBinderContext;
 import 
org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.ExpressionSegment;
 import 
org.apache.shardingsphere.sql.parser.sql.common.segment.dml.predicate.WhereSegment;
-import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
 
 import java.util.HashMap;
 import java.util.Map;
 
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.mockito.Mockito.mock;
 
 class WhereSegmentBinderTest {
@@ -38,8 +39,8 @@ class WhereSegmentBinderTest {
         Map<String, TableSegmentBinderContext> tableBinderContexts = new 
HashMap<>();
         Map<String, TableSegmentBinderContext> outerTableBinderContexts = new 
HashMap<>();
         WhereSegment actualWhereSegment = 
WhereSegmentBinder.bind(expectedWhereSegment, sqlStatementBinderContext, 
tableBinderContexts, outerTableBinderContexts);
-        Assertions.assertEquals(expectedWhereSegment.getStopIndex(), 
actualWhereSegment.getStopIndex());
-        Assertions.assertEquals(expectedWhereSegment.getStartIndex(), 
actualWhereSegment.getStartIndex());
-        Assertions.assertEquals(expectedWhereSegment.getExpr(), 
actualWhereSegment.getExpr());
+        assertThat(actualWhereSegment.getStopIndex(), 
is(expectedWhereSegment.getStopIndex()));
+        assertThat(actualWhereSegment.getStartIndex(), 
is(expectedWhereSegment.getStartIndex()));
+        assertThat(actualWhereSegment.getExpr(), 
is(expectedWhereSegment.getExpr()));
     }
 }

Reply via email to