@@ -54,10 +54,10 @@ public class SqlFormatterTests
5454
5555 private const string None = "" ;
5656 private const string At = "@" ;
57- public static IEnumerable < object [ ] > GetParamPrefixes ( )
57+ public static IEnumerable < TheoryDataRow < string > > GetParamPrefixes ( )
5858 {
59- yield return new object [ ] { None } ;
60- yield return new object [ ] { At } ;
59+ yield return new ( None ) ;
60+ yield return new ( At ) ;
6161 }
6262
6363 private static SqlCommand CreateDbCommand ( CommandType commandType , string text )
@@ -100,6 +100,7 @@ public void InlineParameterNamesInParameterValues()
100100 var formatted = formatter . FormatSql ( command , parameters ) ;
101101 Assert . Equal ( "SELECT * FROM urls WHERE url = 'http://www.example.com?myid=1' OR myid = '1'" , formatted ) ;
102102 }
103+
103104 [ Fact ]
104105 public void InlineParameterValuesDisplayNullForStrings ( )
105106 {
@@ -148,6 +149,23 @@ public void InlineSpacesAfterCommasDisabled()
148149 Assert . Equal ( "SELECT myid,url FROM urls WHERE url = 'http://www.example.com?myid=1' OR myid = '1'" , formatted ) ;
149150 }
150151
152+ [ Fact ]
153+ public void InlineGuidsQuoted ( )
154+ {
155+ var formatter = new InlineFormatter ( )
156+ {
157+ InsertSpacesAfterCommas = false
158+ } ;
159+ var guid = Guid . NewGuid ( ) ;
160+ var parameters = new List < SqlTimingParameter >
161+ {
162+ new SqlTimingParameter ( ) { DbType = "guid" , Name = "id" , Value = guid . ToString ( ) } ,
163+ } ;
164+ const string command = "SELECT 1 FROM urls WHERE id = @id" ;
165+ var formatted = formatter . FormatSql ( command , parameters ) ;
166+ Assert . Equal ( $ "SELECT 1 FROM urls WHERE id = '{ guid } '", formatted ) ;
167+ }
168+
151169 [ Fact ]
152170 public void EnsureVerboseSqlServerFormatterOnlyAddsInformation ( )
153171 {
0 commit comments