Skip to content

Commit

Permalink
> Fixed warnings and add editor config file
Browse files Browse the repository at this point in the history
  • Loading branch information
trueromanus committed Oct 18, 2023
1 parent c26f415 commit 28266c1
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ public IEnumerable<TTestCase> OrderTestCases<TTestCase> ( IEnumerable<TTestCase>
static TValue GetOrCreate<TKey, TValue> ( IDictionary<TKey, TValue> 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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand All @@ -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 );
Expand Down
4 changes: 4 additions & 0 deletions src/PostgreSQL.Migrations/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[*.cs]

# IDE0011: Add braces
dotnet_diagnostic.IDE0011.severity = none
7 changes: 6 additions & 1 deletion src/PostgreSQL.Migrations/PostgreSQL.Migrations.sln
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 28266c1

Please sign in to comment.