diff --git a/roles/lib/files/FWO.Api.Client/FWO.Api.Client.csproj b/roles/lib/files/FWO.Api.Client/FWO.Api.Client.csproj
index 1d279b22ed..d0a5164ba2 100644
--- a/roles/lib/files/FWO.Api.Client/FWO.Api.Client.csproj
+++ b/roles/lib/files/FWO.Api.Client/FWO.Api.Client.csproj
@@ -13,8 +13,8 @@
-
-
+
+
diff --git a/roles/lib/files/FWO.Config.File/FWO.Config.File.csproj b/roles/lib/files/FWO.Config.File/FWO.Config.File.csproj
index 8cf70d18d1..04d8e7cdce 100644
--- a/roles/lib/files/FWO.Config.File/FWO.Config.File.csproj
+++ b/roles/lib/files/FWO.Config.File/FWO.Config.File.csproj
@@ -7,7 +7,7 @@
-
+
diff --git a/roles/lib/files/FWO.Mail/FWO.Mail.csproj b/roles/lib/files/FWO.Mail/FWO.Mail.csproj
index 5025dcdbdd..60c6e8e069 100644
--- a/roles/lib/files/FWO.Mail/FWO.Mail.csproj
+++ b/roles/lib/files/FWO.Mail/FWO.Mail.csproj
@@ -10,7 +10,7 @@
-
+
diff --git a/roles/lib/files/FWO.Report/FWO.Report.csproj b/roles/lib/files/FWO.Report/FWO.Report.csproj
index a32ce5cb95..fe3a225796 100644
--- a/roles/lib/files/FWO.Report/FWO.Report.csproj
+++ b/roles/lib/files/FWO.Report/FWO.Report.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/roles/middleware/files/FWO.Middleware.Server/FWO.Middleware.Server.csproj b/roles/middleware/files/FWO.Middleware.Server/FWO.Middleware.Server.csproj
index d99f24106f..a1dd6871b5 100644
--- a/roles/middleware/files/FWO.Middleware.Server/FWO.Middleware.Server.csproj
+++ b/roles/middleware/files/FWO.Middleware.Server/FWO.Middleware.Server.csproj
@@ -10,8 +10,8 @@
-
-
+
+
diff --git a/roles/middleware/files/FWO.Middleware.Server/Program.cs b/roles/middleware/files/FWO.Middleware.Server/Program.cs
index b3e8260abd..3430e1e8ce 100644
--- a/roles/middleware/files/FWO.Middleware.Server/Program.cs
+++ b/roles/middleware/files/FWO.Middleware.Server/Program.cs
@@ -5,7 +5,7 @@
using FWO.Middleware.Server;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.IdentityModel.Tokens;
-using Microsoft.OpenApi.Models;
+using Microsoft.OpenApi;
using System.Reflection;
// Implicitly call static constructor so background lock process is started
diff --git a/roles/tests-unit/files/FWO.Test/FWO.Test.csproj b/roles/tests-unit/files/FWO.Test/FWO.Test.csproj
index 0d41219454..77d56862d8 100644
--- a/roles/tests-unit/files/FWO.Test/FWO.Test.csproj
+++ b/roles/tests-unit/files/FWO.Test/FWO.Test.csproj
@@ -1,4 +1,4 @@
-
+
net8.0
@@ -8,12 +8,12 @@
-
-
+
+
-
-
-
+
+
+
diff --git a/roles/tests-unit/files/FWO.Test/UiRsbLinkTest.cs b/roles/tests-unit/files/FWO.Test/UiRsbLinkTest.cs
index e90f297ec4..5623776b2e 100644
--- a/roles/tests-unit/files/FWO.Test/UiRsbLinkTest.cs
+++ b/roles/tests-unit/files/FWO.Test/UiRsbLinkTest.cs
@@ -1,4 +1,3 @@
-
using AngleSharp.Css.Dom;
using AngleSharp.Dom;
using Bunit;
@@ -12,13 +11,11 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.JSInterop;
using NUnit.Framework;
-using System.Text.RegularExpressions;
-using System.Threading.Tasks;
namespace FWO.Test
{
[FixtureLifeCycle(LifeCycle.InstancePerTestCase)]
- public class UiRsbLinkTest : Bunit.TestContext
+ public class UiRsbLinkTest : BunitContext
{
static readonly UserConfig userConfig = new SimulatedUserConfig
{
@@ -41,25 +38,25 @@ public async Task ObjShouldBeVisibleAfterNavigation()
Services.AddScoped(_ => JSInterop.JSRuntime);
Services.AddLocalization();
- var objToFind = currentReport.ReportData.ManagementData[0].Objects[1];
- var hrefValue = ReportDevicesBase.GetReportDevicesLinkAddress(OutputLocation.report, currentReport.ReportData.ManagementData[0].Id, ObjCatString.NwObj, 0, objToFind.Id, currentReport.ReportType);
- var link = $"https://localhost/{hrefValue}";
+ Data.NetworkObject objToFind = currentReport.ReportData.ManagementData[0].Objects[1];
+ string hrefValue = ReportDevicesBase.GetReportDevicesLinkAddress(OutputLocation.report, currentReport.ReportData.ManagementData[0].Id, ObjCatString.NwObj, 0, objToFind.Id, currentReport.ReportType);
+ string link = $"https://localhost/{hrefValue}";
- var navigationManager = Services.GetRequiredService();
+ BunitNavigationManager navigationManager = Services.GetRequiredService();
navigationManager.NavigateTo(link);
// Mock JS interop
JSInterop.Setup("getCurrentUrl").SetResult(link);
- var scrollIntoRSBViewInvocation = JSInterop.Setup("scrollIntoRSBView", _ => true).SetResult(true);
- var removeUrlFragmentInvocation = JSInterop.SetupVoid("removeUrlFragment");
+ JSRuntimeInvocationHandler scrollIntoRSBViewInvocation = JSInterop.Setup("scrollIntoRSBView", _ => true).SetResult(true);
+ JSRuntimeInvocationHandler removeUrlFragmentInvocation = JSInterop.SetupVoid("removeUrlFragment");
// Act
- var cut = RenderComponent(parameters => parameters
+ IRenderedComponent cut = Render(parameters => parameters
.Add(p => p.CurrentReport, currentReport)
.Add(p => p.SelectedRules, [currentReport.ReportData.ManagementData[0].Devices[0].Rules![0]]));
// manually trigger
- var anchorNavToRSB = cut.FindComponent();
+ IRenderedComponent anchorNavToRSB = cut.FindComponent();
Task timeout = Task.Delay(2000);
Task scrollTask = anchorNavToRSB.InvokeAsync(() => anchorNavToRSB.Instance.ScrollToFragment());
Task completedTask = await Task.WhenAny(scrollTask, timeout);
@@ -69,12 +66,12 @@ public async Task ObjShouldBeVisibleAfterNavigation()
}
// Assert
Assert.That(scrollIntoRSBViewInvocation.Invocations, Is.Not.Empty, "scrollIntoRSBView should have been called");
- var invocation = scrollIntoRSBViewInvocation.Invocations.First();
- var parameter = invocation.Arguments[0];
+ JSRuntimeInvocation invocation = scrollIntoRSBViewInvocation.Invocations.First();
+ object? parameter = invocation.Arguments[0];
Assert.That(parameter, Is.Not.Null, "scrollIntoRSBView was called with a null parameter");
Assert.That(parameter, Is.InstanceOf(), "scrollIntoRSBView was called with a non-string parameter");
Assert.That((string)parameter!, Is.Not.Empty, "scrollIntoRSBView was called with an empty string");
- var element = cut.Find($"#{parameter}");
+ IElement element = cut.Find($"#{parameter}");
Assert.That(IsElementVisible(element), Is.True, "Element is not visible (might be incorrect tab or collapsed)");
}
@@ -82,8 +79,8 @@ private bool IsElementVisible(IElement? element)
{
while (element != null)
{
- var computedStyle = element.Owner?.DefaultView?.GetComputedStyle(element);
- var display = computedStyle?.GetPropertyValue("display");
+ ICssStyleDeclaration? computedStyle = element.Owner?.DefaultView?.GetComputedStyle(element);
+ string? display = computedStyle?.GetPropertyValue("display");
if (display == "none")
{
Log.WriteError("Test UI RSB", $"Element {element.TagName} is not visible");
diff --git a/roles/ui/files/FWO.UI/FWO.Ui.csproj b/roles/ui/files/FWO.UI/FWO.Ui.csproj
index bbd07b340c..93eacb121e 100644
--- a/roles/ui/files/FWO.UI/FWO.Ui.csproj
+++ b/roles/ui/files/FWO.UI/FWO.Ui.csproj
@@ -8,7 +8,7 @@
-
+