Skip to content

Commit 28266c1

Browse files
committed
> Fixed warnings and add editor config file
1 parent c26f415 commit 28266c1

4 files changed

Lines changed: 14 additions & 1 deletion

File tree

src/PostgreSQL.Migrations.UnitTests/IntegrationTests/PriorityOrderer.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ public IEnumerable<TTestCase> OrderTestCases<TTestCase> ( IEnumerable<TTestCase>
2929
static TValue GetOrCreate<TKey, TValue> ( IDictionary<TKey, TValue> dictionary, TKey key ) where TValue : new() {
3030
TValue result;
3131

32+
#pragma warning disable CS8600 // Converting null literal or possible null value to non-nullable type.
3233
if ( dictionary.TryGetValue ( key, out result ) ) return result;
34+
#pragma warning restore CS8600 // Converting null literal or possible null value to non-nullable type.
3335

3436
result = new TValue ();
3537
dictionary[key] = result;

src/PostgreSQL.Migrations.UnitTests/UnitTests/MigrationResolverAttributeUnitTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ public async Task GetMigrations_GroupFilter_MultipleGroups_Completed () {
8282
//assert
8383
Assert.True ( migrations.Count () == 2 );
8484
var firstMigration = migrations.FirstOrDefault ( a => a.MigrationNumber == 1 );
85+
Assert.NotNull ( firstMigration );
8586
Assert.Equal ( 1, firstMigration.MigrationNumber );
8687
var secondMigration = migrations.FirstOrDefault ( a => a.MigrationNumber == 2 );
8788
Assert.NotNull ( secondMigration );
@@ -102,6 +103,7 @@ public async Task GetMigrations_GroupFilter_MultipleGroups_SecondGroupInAttribut
102103
//assert
103104
Assert.True ( migrations.Count () == 2 );
104105
var firstMigration = migrations.FirstOrDefault ( a => a.MigrationNumber == 1 );
106+
Assert.NotNull ( firstMigration );
105107
Assert.Equal ( 1, firstMigration.MigrationNumber );
106108
var secondMigration = migrations.FirstOrDefault ( a => a.MigrationNumber == 2 );
107109
Assert.NotNull ( secondMigration );
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[*.cs]
2+
3+
# IDE0011: Add braces
4+
dotnet_diagnostic.IDE0011.severity = none

src/PostgreSQL.Migrations/PostgreSQL.Migrations.sln

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PostgreSQL.Migrations.Tests
99
EndProject
1010
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PostgreSQL.Migrations.Console", "..\PostgreSQL.Migrations.Console\PostgreSQL.Migrations.Console.csproj", "{AAF067AD-E33C-466D-BD8C-087F42226339}"
1111
EndProject
12-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PostgreSQL.Migrations.Console.Tests", "..\PostgreSQL.Migrations.Console.Tests\PostgreSQL.Migrations.Console.Tests.csproj", "{25034F45-5A2F-460E-A523-35747FA1CB34}"
12+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PostgreSQL.Migrations.Console.Tests", "..\PostgreSQL.Migrations.Console.Tests\PostgreSQL.Migrations.Console.Tests.csproj", "{25034F45-5A2F-460E-A523-35747FA1CB34}"
13+
EndProject
14+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{E5194E7A-DA57-459F-BB5A-423871301697}"
15+
ProjectSection(SolutionItems) = preProject
16+
.editorconfig = .editorconfig
17+
EndProjectSection
1318
EndProject
1419
Global
1520
GlobalSection(SolutionConfigurationPlatforms) = preSolution

0 commit comments

Comments
 (0)