chore(format): dotnet format whitespace — alignement style CI

This commit is contained in:
Arnaud Dartois committed 2026-08-12 19:49:30 +02:00
1 parent 04b1d7d55e
commit ed363ab1b0
5 files changed
+50 -50

No files matched your search

@@ -27,15 +27,15 @@ public class AgentDetailLogsTests : PageTestBase
string level = "Warning",
string? source = "AgentRegistrationService",
string? exception = null) => new()
{
Id = Guid.NewGuid(),
AgentId = AgentId,
TimestampUtc = DateTime.UtcNow.AddMinutes(-5),
Level = level,
Message = message,
Source = source,
Exception = exception
};
{
Id = Guid.NewGuid(),
AgentId = AgentId,
TimestampUtc = DateTime.UtcNow.AddMinutes(-5),
Level = level,
Message = message,
Source = source,
Exception = exception
};
private void HandlerLogs(PagedData<AgentLogItem> data)
=> Handler.OnGet($"api/agents/{AgentId}/logs", data);
@@ -14,15 +14,15 @@ public class AuditLogsPageTests : PageTestBase
string resourceType = "User",
string? userEmail = "admin@heimdall.local",
string? ip = "192.168.1.10") => new()
{
Id = Guid.NewGuid(),
UserEmail = userEmail,
Action = action,
ResourceType = resourceType,
ResourceId = Guid.NewGuid().ToString(),
IpAddress = ip,
Timestamp = DateTime.UtcNow.AddHours(-1)
};
{
Id = Guid.NewGuid(),
UserEmail = userEmail,
Action = action,
ResourceType = resourceType,
ResourceId = Guid.NewGuid().ToString(),
IpAddress = ip,
Timestamp = DateTime.UtcNow.AddHours(-1)
};
[Fact]
public void AuditLogsPage_AfficheLogs()
@@ -17,23 +17,23 @@ public class DiscoveriesPageTests : PageTestBase
string? vendor = "Hikvision",
string? hardware = "DS-2CD2T47",
string[]? urls = null) => new()
{
Id = DiscoveryId,
SiteId = SiteId,
IpAddress = ip,
MacAddress = "3C:EF:8C:12:34:56",
Vendor = vendor,
OnvifHardware = hardware,
IsReachable = true,
DetectedType = "Standard",
DiscoveryMethod = "OnvifWsDiscovery",
OpenPorts = [80, 554, 3702],
OnvifDeviceServiceUrl = $"http://{ip}/onvif/device_service",
OnvifName = vendor,
OnvifPort = 3702,
ProbedAt = DateTime.UtcNow.AddMinutes(-2),
StreamUrls = urls ?? [$"rtsp://{ip}:554/stream1"],
};
{
Id = DiscoveryId,
SiteId = SiteId,
IpAddress = ip,
MacAddress = "3C:EF:8C:12:34:56",
Vendor = vendor,
OnvifHardware = hardware,
IsReachable = true,
DetectedType = "Standard",
DiscoveryMethod = "OnvifWsDiscovery",
OpenPorts = [80, 554, 3702],
OnvifDeviceServiceUrl = $"http://{ip}/onvif/device_service",
OnvifName = vendor,
OnvifPort = 3702,
ProbedAt = DateTime.UtcNow.AddMinutes(-2),
StreamUrls = urls ?? [$"rtsp://{ip}:554/stream1"],
};
private static AgentItem Agent() => new()
{
@@ -14,18 +14,18 @@ public class UsersPageTests : PageTestBase
string email = "alice@heimdall.local",
IList<string>? roles = null,
bool lockedOut = false) => new()
{
Id = Guid.NewGuid(),
Email = email,
DisplayName = name,
Theme = "Auto",
Language = "fr",
Roles = roles ?? ["Viewer"],
TwoFactorEnabled = false,
IsLockedOut = lockedOut,
EmailConfirmed = true,
CreatedAt = DateTime.UtcNow.AddDays(-10)
};
{
Id = Guid.NewGuid(),
Email = email,
DisplayName = name,
Theme = "Auto",
Language = "fr",
Roles = roles ?? ["Viewer"],
TwoFactorEnabled = false,
IsLockedOut = lockedOut,
EmailConfirmed = true,
CreatedAt = DateTime.UtcNow.AddDays(-10)
};
[Fact]
public void UsersPage_AfficheListeDesUtilisateurs()
@@ -63,9 +63,9 @@ public class ExceptionFilterTests
Assert.True(dict.ContainsKey("error"));
var error = dict["error"];
var errorType = error!.GetType();
var errorDict = errorType.GetProperties()
.ToDictionary(p => p.Name, p => p.GetValue(error));
var errorType = error!.GetType();
var errorDict = errorType.GetProperties()
.ToDictionary(p => p.Name, p => p.GetValue(error));
Assert.Equal("InternalServerError", errorDict["code"]?.ToString());
Assert.Equal("An unexpected error occurred", errorDict["message"]?.ToString());