Update package versions and improve null safety in tests
- Updated various package versions in `Directory.Packages.props` to the latest compatible releases, enhancing overall stability and security. - Modified test assertions in `GrantBillingGiftCommandHandlerTests`, `RejectPaymentRequestCommandHandlerTests`, `BlockUserCommandHandlerTests`, and `DeleteUserCommandHandlerTests` to use null-safe checks, ensuring robustness against potential null reference exceptions. - Updated PostgreSqlContainer initialization in `PnvPanelWebApplicationFactory` for improved clarity and maintainability.
This commit is contained in:
+1
-1
@@ -74,7 +74,7 @@ public class GrantBillingGiftCommandHandlerTests
|
||||
.Received(1)
|
||||
.NotifyUserAsync(
|
||||
userId,
|
||||
Arg.Is<string>(m => m.Contains("30")),
|
||||
Arg.Is<string>(m => m!.Contains("30")),
|
||||
Arg.Any<string?>(),
|
||||
Arg.Any<CancellationToken>()
|
||||
);
|
||||
|
||||
+1
-1
@@ -71,7 +71,7 @@ public class RejectPaymentRequestCommandHandlerTests
|
||||
.Received(1)
|
||||
.NotifyUserAsync(
|
||||
userId,
|
||||
Arg.Is<string>(m => m.Contains("Платёж не найден")),
|
||||
Arg.Is<string>(m => m!.Contains("Платёж не найден")),
|
||||
Arg.Any<string?>(),
|
||||
Arg.Any<CancellationToken>()
|
||||
);
|
||||
|
||||
+1
-1
@@ -118,7 +118,7 @@ public class BlockUserCommandHandlerTests
|
||||
await _gateway
|
||||
.Received(1)
|
||||
.UpdateClientAsync(
|
||||
Arg.Is<Node>(n => n.Id == node.Id),
|
||||
Arg.Is<Node>(n => n!.Id == node.Id),
|
||||
inbound.RemoteInboundId,
|
||||
config.ClientExternalId,
|
||||
config.Protocol,
|
||||
|
||||
+1
-1
@@ -99,7 +99,7 @@ public class DeleteUserCommandHandlerTests
|
||||
await _gateway
|
||||
.Received(1)
|
||||
.RemoveClientAsync(
|
||||
Arg.Is<Node>(n => n.Id == node.Id),
|
||||
Arg.Is<Node>(n => n!.Id == node.Id),
|
||||
inbound.RemoteInboundId,
|
||||
"external-id",
|
||||
config.Protocol,
|
||||
|
||||
+1
-2
@@ -20,8 +20,7 @@ public sealed class PnvPanelWebApplicationFactory : WebApplicationFactory<Progra
|
||||
public const string AdminUserName = "test-admin";
|
||||
public const string AdminPassword = "TestAdmin123!";
|
||||
|
||||
private readonly PostgreSqlContainer _postgres = new PostgreSqlBuilder()
|
||||
.WithImage("postgres:17-alpine")
|
||||
private readonly PostgreSqlContainer _postgres = new PostgreSqlBuilder("postgres:17-alpine")
|
||||
.WithDatabase("pnvpanel")
|
||||
.WithUsername("pnvpanel")
|
||||
.WithPassword("pnvpanel")
|
||||
|
||||
Reference in New Issue
Block a user