11using Microsoft . Data . SqlClient ;
22using Microsoft . VisualStudio . TestTools . UnitTesting ;
3+ using RepoDb . Extensions ;
34using RepoDb . IntegrationTests ;
45using RepoDb . IntegrationTests . Models ;
56using RepoDb . IntegrationTests . Setup ;
@@ -35,7 +36,7 @@ public void TestDbHelperGetFields()
3536 var helper = connection . GetDbHelper ( ) ;
3637
3738 // Act
38- var fields = helper . GetFields ( connection , "[sc].[IdentityTable]" , null ) ;
39+ var fields = helper . GetFields ( connection , "[sc].[IdentityTable]" . AsUnquoted ( connection . GetDbSetting ( ) ) , null ) ;
3940
4041 // Assert
4142 using var reader = connection . ExecuteReader ( "SELECT name FROM sys.columns WHERE object_id = OBJECT_ID(@TableName);" ,
@@ -66,7 +67,7 @@ public void TestDbHelperGetFieldsPrimary()
6667 var helper = connection . GetDbHelper ( ) ;
6768
6869 // Act
69- var fields = helper . GetFields ( connection , "[NonIdentityTable]" , null ) ;
70+ var fields = helper . GetFields ( connection , "[NonIdentityTable]" . AsUnquoted ( connection . GetDbSetting ( ) ) , null ) ;
7071 var primary = fields . FirstOrDefault ( f => f . IsPrimary == true ) ;
7172
7273 // Assert
@@ -83,7 +84,7 @@ public void TestDbHelperGetFieldsIdentity()
8384 var helper = connection . GetDbHelper ( ) ;
8485
8586 // Act
86- var fields = helper . GetFields ( connection , "[sc].[IdentityTable]" , null ) ;
87+ var fields = helper . GetFields ( connection , "[sc].[IdentityTable]" . AsUnquoted ( connection . GetDbSetting ( ) ) , null ) ;
8788 var primary = fields . FirstOrDefault ( f => f . IsIdentity == true ) ;
8889
8990 // Assert
@@ -104,7 +105,7 @@ public async Task TestDbHelperGetFieldsAsync()
104105 var helper = connection . GetDbHelper ( ) ;
105106
106107 // Act
107- var fields = await helper . GetFieldsAsync ( connection , "[sc].[IdentityTable]" , null ) ;
108+ var fields = await helper . GetFieldsAsync ( connection , "[sc].[IdentityTable]" . AsUnquoted ( connection . GetDbSetting ( ) ) , null ) ;
108109
109110 // Assert
110111 using var reader = connection . ExecuteReader ( "SELECT name FROM sys.columns WHERE object_id = OBJECT_ID(@TableName);" ,
@@ -135,7 +136,7 @@ public async Task TestDbHelperGetFieldsAsyncPrimary()
135136 var helper = connection . GetDbHelper ( ) ;
136137
137138 // Act
138- var fields = await helper . GetFieldsAsync ( connection , "[NonIdentityTable]" , null ) ;
139+ var fields = await helper . GetFieldsAsync ( connection , "[NonIdentityTable]" . AsUnquoted ( connection . GetDbSetting ( ) ) , null ) ;
139140 var primary = fields . FirstOrDefault ( f => f . IsPrimary == true ) ;
140141
141142 // Assert
@@ -152,7 +153,7 @@ public async Task TestDbHelperGetFieldsAsyncIdentity()
152153 var helper = connection . GetDbHelper ( ) ;
153154
154155 // Act
155- var fields = await helper . GetFieldsAsync ( connection , "[sc].[IdentityTable]" , null ) ;
156+ var fields = await helper . GetFieldsAsync ( connection , "[sc].[IdentityTable]" . AsUnquoted ( connection . GetDbSetting ( ) ) , null ) ;
156157 var primary = fields . FirstOrDefault ( f => f . IsIdentity == true ) ;
157158
158159 // Assert
0 commit comments