From d10ab98302b373fb8d96b961dbb6202fabe45cc7 Mon Sep 17 00:00:00 2001 From: Ivar Nesje Date: Thu, 25 Apr 2024 08:10:10 +0200 Subject: [PATCH] Revert "Make AppOptions.Options required" (#612) --- src/Altinn.App.Core/Models/AppOptions.cs | 2 +- .../Extensions/DictionaryExtensionsTests.cs | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/Altinn.App.Core/Models/AppOptions.cs b/src/Altinn.App.Core/Models/AppOptions.cs index 248c53630..de1ca4c3b 100644 --- a/src/Altinn.App.Core/Models/AppOptions.cs +++ b/src/Altinn.App.Core/Models/AppOptions.cs @@ -8,7 +8,7 @@ public class AppOptions /// /// Gets or sets the list of options. Null indicates that no options are found /// - public required List? Options { get; set; } + public List? Options { get; set; } /// /// Gets or sets the parameters used to generate the options. diff --git a/test/Altinn.App.Core.Tests/Extensions/DictionaryExtensionsTests.cs b/test/Altinn.App.Core.Tests/Extensions/DictionaryExtensionsTests.cs index 7b0250b4d..197800bf9 100644 --- a/test/Altinn.App.Core.Tests/Extensions/DictionaryExtensionsTests.cs +++ b/test/Altinn.App.Core.Tests/Extensions/DictionaryExtensionsTests.cs @@ -12,8 +12,7 @@ public void ToNameValueString_OptionParameters_ShouldConvertToHttpHeaderFormat() { var options = new AppOptions { - Options = null, - Parameters = new Dictionary + Parameters = new Dictionary { { "lang", "nb" }, { "level", "1" } @@ -33,8 +32,7 @@ public void ToNameValueString_OptionParametersWithEmptyValue_ShouldConvertToHttp { var options = new AppOptions { - Options = null, - Parameters = new Dictionary() + Parameters = new Dictionary() }; IHeaderDictionary headers = new HeaderDictionary @@ -50,7 +48,6 @@ public void ToNameValueString_OptionParametersWithNullValue_ShouldConvertToHttpH { var options = new AppOptions { - Options = null, Parameters = null! }; @@ -67,8 +64,7 @@ public void ToNameValueString_OptionParametersWithSpecialCharaters_IsValidAsHead { var options = new AppOptions { - Options = null, - Parameters = new Dictionary + Parameters = new Dictionary { { "lang", "nb" }, { "level", "1" },