Skip to content

Commit 6c13fc4

Browse files
Fix unit tests.
1 parent 3c4bdac commit 6c13fc4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/Database.Updater.Tests/DatabaseUpdaterTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public async Task UpgradeAsync_WithErrorMigrationsAssembly()
7676

7777
result.Should().Be(99);
7878

79-
loggingProvider.Output.Should().Be("[PosInformatique.Database.Updater.IDatabaseUpdater] (Error) : Some errors occured during the migration...\r\n");
79+
loggingProvider.Output.Should().Be($"[PosInformatique.Database.Updater.IDatabaseUpdater] (Error) : Some errors occured during the migration...{Environment.NewLine}");
8080

8181
output.ToString().Should().StartWith("fail: PosInformatique.Database.Updater.IDatabaseUpdater[0]");
8282
}
@@ -117,7 +117,7 @@ await databaseUpdater.Invoking(du => du.UpgradeAsync([database.ConnectionString]
117117
.Should().ThrowExactlyAsync<DivideByZeroException>()
118118
.WithMessage("Some errors occured during the migration...");
119119

120-
loggingProvider.Output.Should().Be("[PosInformatique.Database.Updater.IDatabaseUpdater] (Error) : Some errors occured during the migration...\r\n");
120+
loggingProvider.Output.Should().Be($"[PosInformatique.Database.Updater.IDatabaseUpdater] (Error) : Some errors occured during the migration...{Environment.NewLine}");
121121

122122
output.ToString().Should().StartWith("fail: PosInformatique.Database.Updater.IDatabaseUpdater[0]");
123123
}

tests/Database.Updater.Tests/Logging/InMemoryLoggingProviderTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ public void CreateLogger_Log()
1919

2020
logger1.LogInformation("The information");
2121

22-
provider.Output.Should().Be("[The category 1] (Information) : The information\r\n");
22+
provider.Output.Should().Be($"[The category 1] (Information) : The information{Environment.NewLine}");
2323

2424
logger2.LogError("The error");
2525

26-
provider.Output.Should().Be("[The category 1] (Information) : The information\r\n[The category 2] (Error) : The error\r\n");
26+
provider.Output.Should().Be($"[The category 1] (Information) : The information{Environment.NewLine}[The category 2] (Error) : The error{Environment.NewLine}");
2727
}
2828

2929
[Fact]

0 commit comments

Comments
 (0)