This is an automated email from the ASF dual-hosted git repository.
zhangliang 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 b0d9fe7a3f2 Add more test cases on ShardingSphereIdentifier (#37054)
b0d9fe7a3f2 is described below
commit b0d9fe7a3f2baf571ab81c92dd50f54a01025782
Author: Liang Zhang <[email protected]>
AuthorDate: Sun Nov 9 18:19:50 2025 +0800
Add more test cases on ShardingSphereIdentifier (#37054)
---
CLAUDE.md | 2 +-
.../infra/metadata/identifier/ShardingSphereIdentifierTest.java | 8 ++++++++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/CLAUDE.md b/CLAUDE.md
index 624ab659041..c559b3022a7 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -71,7 +71,7 @@ Core concepts:
2. 100% test coverage for all new code (see testing philosophy for details)
3. NEVER auto-commit to Git without explicit instruction
4. Work only within explicitly specified scope (see core prohibitions)
-5. Apply formatting only to new code (see formatting standards)
+5. Format all modified code before task completion (run ./mvnw spotless:apply
-Pcheck)
## Core Prohibitions
diff --git
a/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/identifier/ShardingSphereIdentifierTest.java
b/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/identifier/ShardingSphereIdentifierTest.java
index 791194b6728..2c39a156f36 100644
---
a/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/identifier/ShardingSphereIdentifierTest.java
+++
b/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/identifier/ShardingSphereIdentifierTest.java
@@ -23,9 +23,17 @@ import org.junit.jupiter.api.Test;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.not;
import static org.hamcrest.MatcherAssert.assertThat;
+import static org.mockito.Mockito.mock;
class ShardingSphereIdentifierTest {
+ @Test
+ void assertConstructor() {
+ assertThat(new ShardingSphereIdentifier("foo", mock()).getValue(),
is("foo"));
+ assertThat(new ShardingSphereIdentifier(new
IdentifierValue("`foo`")).getValue(), is("foo"));
+ assertThat(new ShardingSphereIdentifier(new IdentifierValue("`foo`"),
mock()).getValue(), is("foo"));
+ }
+
@Test
void assertEqualsWithNotShardingSphereIdentifier() {
assertThat(new ShardingSphereIdentifier("foo"), not(new Object()));