diff --git a/src/PostgreSQL.Migrations.UnitTests/IntegrationTests/PriorityOrderer.cs b/src/PostgreSQL.Migrations.UnitTests/IntegrationTests/PriorityOrderer.cs index ff39981..5fb8fb9 100644 --- a/src/PostgreSQL.Migrations.UnitTests/IntegrationTests/PriorityOrderer.cs +++ b/src/PostgreSQL.Migrations.UnitTests/IntegrationTests/PriorityOrderer.cs @@ -29,7 +29,9 @@ public IEnumerable OrderTestCases ( IEnumerable static TValue GetOrCreate ( IDictionary dictionary, TKey key ) where TValue : new() { TValue result; +#pragma warning disable CS8600 // Converting null literal or possible null value to non-nullable type. if ( dictionary.TryGetValue ( key, out result ) ) return result; +#pragma warning restore CS8600 // Converting null literal or possible null value to non-nullable type. result = new TValue (); dictionary[key] = result; diff --git a/src/PostgreSQL.Migrations.UnitTests/UnitTests/MigrationResolverAttributeUnitTests.cs b/src/PostgreSQL.Migrations.UnitTests/UnitTests/MigrationResolverAttributeUnitTests.cs index 3cea254..0323c74 100644 --- a/src/PostgreSQL.Migrations.UnitTests/UnitTests/MigrationResolverAttributeUnitTests.cs +++ b/src/PostgreSQL.Migrations.UnitTests/UnitTests/MigrationResolverAttributeUnitTests.cs @@ -82,6 +82,7 @@ public async Task GetMigrations_GroupFilter_MultipleGroups_Completed () { //assert Assert.True ( migrations.Count () == 2 ); var firstMigration = migrations.FirstOrDefault ( a => a.MigrationNumber == 1 ); + Assert.NotNull ( firstMigration ); Assert.Equal ( 1, firstMigration.MigrationNumber ); var secondMigration = migrations.FirstOrDefault ( a => a.MigrationNumber == 2 ); Assert.NotNull ( secondMigration ); @@ -102,6 +103,7 @@ public async Task GetMigrations_GroupFilter_MultipleGroups_SecondGroupInAttribut //assert Assert.True ( migrations.Count () == 2 ); var firstMigration = migrations.FirstOrDefault ( a => a.MigrationNumber == 1 ); + Assert.NotNull ( firstMigration ); Assert.Equal ( 1, firstMigration.MigrationNumber ); var secondMigration = migrations.FirstOrDefault ( a => a.MigrationNumber == 2 ); Assert.NotNull ( secondMigration ); diff --git a/src/PostgreSQL.Migrations/.editorconfig b/src/PostgreSQL.Migrations/.editorconfig new file mode 100644 index 0000000..b9f3aa2 --- /dev/null +++ b/src/PostgreSQL.Migrations/.editorconfig @@ -0,0 +1,4 @@ +[*.cs] + +# IDE0011: Add braces +dotnet_diagnostic.IDE0011.severity = none diff --git a/src/PostgreSQL.Migrations/PostgreSQL.Migrations.sln b/src/PostgreSQL.Migrations/PostgreSQL.Migrations.sln index 7b6c7aa..bcc3a5f 100644 --- a/src/PostgreSQL.Migrations/PostgreSQL.Migrations.sln +++ b/src/PostgreSQL.Migrations/PostgreSQL.Migrations.sln @@ -9,7 +9,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PostgreSQL.Migrations.Tests EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PostgreSQL.Migrations.Console", "..\PostgreSQL.Migrations.Console\PostgreSQL.Migrations.Console.csproj", "{AAF067AD-E33C-466D-BD8C-087F42226339}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PostgreSQL.Migrations.Console.Tests", "..\PostgreSQL.Migrations.Console.Tests\PostgreSQL.Migrations.Console.Tests.csproj", "{25034F45-5A2F-460E-A523-35747FA1CB34}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PostgreSQL.Migrations.Console.Tests", "..\PostgreSQL.Migrations.Console.Tests\PostgreSQL.Migrations.Console.Tests.csproj", "{25034F45-5A2F-460E-A523-35747FA1CB34}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{E5194E7A-DA57-459F-BB5A-423871301697}" + ProjectSection(SolutionItems) = preProject + .editorconfig = .editorconfig + EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution