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

duanzhengqiang 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 bbdd7e0e6d7 [Issue #20386]-Added more scenarios to 
CreateSchemaStatementHandlerTest (#20787)
bbdd7e0e6d7 is described below

commit bbdd7e0e6d7025e6cbe44db3668135fc37182073
Author: Abhinav Koppula <[email protected]>
AuthorDate: Tue Sep 6 05:37:01 2022 +0530

    [Issue #20386]-Added more scenarios to CreateSchemaStatementHandlerTest 
(#20787)
---
 .../dialect/handler/ddl/CreateSchemaStatementHandlerTest.java    | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git 
a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/test/java/org/apache/shardingsphere/sql/parser/sql/dialect/handler/ddl/CreateSchemaStatementHandlerTest.java
 
b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/test/java/org/apache/shardingsphere/sql/parser/sql/dialect/handler/ddl/CreateSchemaStatementHandlerTest.java
index b5161fbfd1b..930e522286b 100644
--- 
a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/test/java/org/apache/shardingsphere/sql/parser/sql/dialect/handler/ddl/CreateSchemaStatementHandlerTest.java
+++ 
b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/test/java/org/apache/shardingsphere/sql/parser/sql/dialect/handler/ddl/CreateSchemaStatementHandlerTest.java
@@ -20,11 +20,13 @@ package 
org.apache.shardingsphere.sql.parser.sql.dialect.handler.ddl;
 import 
org.apache.shardingsphere.sql.parser.sql.common.value.identifier.IdentifierValue;
 import 
org.apache.shardingsphere.sql.parser.sql.dialect.statement.opengauss.ddl.OpenGaussCreateSchemaStatement;
 import 
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLCreateSchemaStatement;
+import 
org.apache.shardingsphere.sql.parser.sql.dialect.statement.sqlserver.ddl.SQLServerCreateSchemaStatement;
 import org.junit.Test;
 
 import java.util.Optional;
 
 import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 
@@ -47,4 +49,11 @@ public final class CreateSchemaStatementHandlerTest {
         assertTrue(actual.isPresent());
         assertThat(actual.get().getValue(), is("root"));
     }
+
+    @Test
+    public void assertGetUsernameForSQLServerStatement() {
+        SQLServerCreateSchemaStatement createSchemaStatement = new 
SQLServerCreateSchemaStatement();
+        Optional<IdentifierValue> actual = 
CreateSchemaStatementHandler.getUsername(createSchemaStatement);
+        assertFalse(actual.isPresent());
+    }
 }

Reply via email to