@@ -11,33 +11,7 @@ namespace DbUp.Postgresql.Tests;
1111
1212public class PostgresTableJournalTests : IDisposable
1313{
14- [ Fact ]
15- public void uses_named_parameters_when_sql_rewriting_not_specified ( )
16- {
17- // Arrange
18- var dbConnection = Substitute . For < IDbConnection > ( ) ;
19- var connectionManager = new TestConnectionManager ( dbConnection , true ) ;
20- var command = Substitute . For < IDbCommand > ( ) ;
21- var param1 = Substitute . For < IDbDataParameter > ( ) ;
22- var param2 = Substitute . For < IDbDataParameter > ( ) ;
23- dbConnection . CreateCommand ( ) . Returns ( command ) ;
24- command . CreateParameter ( ) . Returns ( param1 , param2 ) ;
25- command . ExecuteScalar ( ) . Returns ( x => 0 ) ;
26- var consoleUpgradeLog = new ConsoleUpgradeLog ( ) ;
27- var journal = new PostgresqlTableJournal ( ( ) => connectionManager , ( ) => consoleUpgradeLog , "public" , "SchemaVersions" ) ;
28-
29- // Act
30- journal . StoreExecutedScript ( new SqlScript ( "test" , "select 1" ) , ( ) => command ) ;
31-
32- // Assert
33- command . Received ( 2 ) . CreateParameter ( ) ;
34- param1 . ParameterName . ShouldBe ( "scriptName" ) ;
35- param2 . ParameterName . ShouldBe ( "applied" ) ;
36- command . CommandText . ShouldBe ( """insert into "public"."SchemaVersions" (ScriptName, Applied) values (@scriptName, @applied)""" ) ;
37- command . Received ( ) . ExecuteNonQuery ( ) ;
38- }
39-
40- [ Fact ]
14+ [ Fact ]
4115 public void uses_positional_parameters_when_sql_rewriting_disabled ( )
4216 {
4317 AppContext . SetSwitch ( "Npgsql.EnableSqlRewriting" , false ) ;
0 commit comments