From 825b155756a918894c10f23d99b5862066e37203 Mon Sep 17 00:00:00 2001 From: Arne Halvorsen Date: Sat, 12 Jun 2021 16:42:21 +0200 Subject: [PATCH] Finished unit test coding for #100 --- .../Configurations/ConfSetting.cs | 4 +- .../Configurations/ConfSetting1.cs | 6 ++ .../Configurations/ConfSetting2.cs | 6 ++ .../Configurations/ConfSetting3.cs | 6 ++ .../Configurations/SystemConfiguration1.cs | 1 - .../Configurations/SystemConfiguration2.cs | 1 - .../Configurations/SystemConfiguration3.cs | 1 - ...urationForTestingReadingOfConfiguration.cs | 29 +++++++-- ...estingReadingOfConfigurationUserSecrets.cs | 25 ++++++-- src/HitUnitTests/HitUnitTests.csproj | 5 +- src/HitUnitTests/TestLogic/TestHierarchies.cs | 61 +++++++++++++++++-- .../UnitTest1_runningUnitTests.cs | 1 - .../UnitTest2_runningSyncUnitTests.cs | 1 - .../UnitTest3_runningUnitTests.cs | 1 - src/HitUnitTests/UnitTests1_space.cs | 1 - src/HitUnitTests/UnitTests2_space.cs | 1 - src/HitUnitTests/UnitTests3_space.cs | 1 - src/HitUnitTests/UnitTests4.cs | 2 +- src/HitUnitTests/UnitTests5.cs | 1 - src/HitUnitTests/UnitTests6.cs | 20 ++++++ src/HitUnitTests/UnitTests7.cs | 23 +++++++ src/HitUnitTests/Worlds.cs | 38 ++++++++++++ src/HitUnitTests/Worlds/World1.cs | 9 --- src/HitUnitTests/Worlds/World2.cs | 9 --- src/HitUnitTests/Worlds/World3.cs | 9 --- src/HitUnitTests/Worlds/World4.cs | 9 --- src/HitUnitTests/Worlds/World5.cs | 9 --- .../configuration-no-sections-1.json | 2 +- .../configuration-no-sections-2.json | 2 +- ...ons.json => configuration-sections-1.json} | 4 +- .../configuration-sections-2.json | 12 ++++ src/HitUnitTests/secret.json | 20 ++++++ 32 files changed, 243 insertions(+), 77 deletions(-) create mode 100644 src/HitUnitTests/Configurations/ConfSetting1.cs create mode 100644 src/HitUnitTests/Configurations/ConfSetting2.cs create mode 100644 src/HitUnitTests/Configurations/ConfSetting3.cs create mode 100644 src/HitUnitTests/UnitTests6.cs create mode 100644 src/HitUnitTests/UnitTests7.cs create mode 100644 src/HitUnitTests/Worlds.cs delete mode 100644 src/HitUnitTests/Worlds/World1.cs delete mode 100644 src/HitUnitTests/Worlds/World2.cs delete mode 100644 src/HitUnitTests/Worlds/World3.cs delete mode 100644 src/HitUnitTests/Worlds/World4.cs delete mode 100644 src/HitUnitTests/Worlds/World5.cs rename src/HitUnitTests/{configuration-sections.json => configuration-sections-1.json} (76%) create mode 100644 src/HitUnitTests/configuration-sections-2.json create mode 100644 src/HitUnitTests/secret.json diff --git a/src/HitUnitTests/Configurations/ConfSetting.cs b/src/HitUnitTests/Configurations/ConfSetting.cs index 794c614..64a107f 100644 --- a/src/HitUnitTests/Configurations/ConfSetting.cs +++ b/src/HitUnitTests/Configurations/ConfSetting.cs @@ -1,7 +1,9 @@ namespace HitUnitTests.Configurations { - public class ConfSetting + public abstract class ConfSetting { public string Name { get; set; } + + public override string ToString() => $"{GetType().Name}_{Name}"; } } diff --git a/src/HitUnitTests/Configurations/ConfSetting1.cs b/src/HitUnitTests/Configurations/ConfSetting1.cs new file mode 100644 index 0000000..5ecc3f2 --- /dev/null +++ b/src/HitUnitTests/Configurations/ConfSetting1.cs @@ -0,0 +1,6 @@ +namespace HitUnitTests.Configurations +{ + public class ConfSetting1 : ConfSetting + { + } +} diff --git a/src/HitUnitTests/Configurations/ConfSetting2.cs b/src/HitUnitTests/Configurations/ConfSetting2.cs new file mode 100644 index 0000000..282b16a --- /dev/null +++ b/src/HitUnitTests/Configurations/ConfSetting2.cs @@ -0,0 +1,6 @@ +namespace HitUnitTests.Configurations +{ + public class ConfSetting2 : ConfSetting + { + } +} diff --git a/src/HitUnitTests/Configurations/ConfSetting3.cs b/src/HitUnitTests/Configurations/ConfSetting3.cs new file mode 100644 index 0000000..90109c1 --- /dev/null +++ b/src/HitUnitTests/Configurations/ConfSetting3.cs @@ -0,0 +1,6 @@ +namespace HitUnitTests.Configurations +{ + public class ConfSetting3 : ConfSetting + { + } +} diff --git a/src/HitUnitTests/Configurations/SystemConfiguration1.cs b/src/HitUnitTests/Configurations/SystemConfiguration1.cs index 03948d0..0578ad4 100644 --- a/src/HitUnitTests/Configurations/SystemConfiguration1.cs +++ b/src/HitUnitTests/Configurations/SystemConfiguration1.cs @@ -1,6 +1,5 @@ using Hit.Infrastructure.Attributes; using Hit.Infrastructure.User; -using HitUnitTests.Worlds; namespace HitUnitTests.Configurations { diff --git a/src/HitUnitTests/Configurations/SystemConfiguration2.cs b/src/HitUnitTests/Configurations/SystemConfiguration2.cs index 9b533e3..8304789 100644 --- a/src/HitUnitTests/Configurations/SystemConfiguration2.cs +++ b/src/HitUnitTests/Configurations/SystemConfiguration2.cs @@ -1,6 +1,5 @@ using Hit.Infrastructure.Attributes; using Hit.Infrastructure.User; -using HitUnitTests.Worlds; namespace HitUnitTests.Configurations { diff --git a/src/HitUnitTests/Configurations/SystemConfiguration3.cs b/src/HitUnitTests/Configurations/SystemConfiguration3.cs index aa47c05..80a3d30 100644 --- a/src/HitUnitTests/Configurations/SystemConfiguration3.cs +++ b/src/HitUnitTests/Configurations/SystemConfiguration3.cs @@ -1,6 +1,5 @@ using Hit.Infrastructure.Attributes; using Hit.Infrastructure.User; -using HitUnitTests.Worlds; namespace HitUnitTests.Configurations { diff --git a/src/HitUnitTests/Configurations/SystemConfigurationForTestingReadingOfConfiguration.cs b/src/HitUnitTests/Configurations/SystemConfigurationForTestingReadingOfConfiguration.cs index a624e0d..68ecc0b 100644 --- a/src/HitUnitTests/Configurations/SystemConfigurationForTestingReadingOfConfiguration.cs +++ b/src/HitUnitTests/Configurations/SystemConfigurationForTestingReadingOfConfiguration.cs @@ -1,6 +1,5 @@ using Hit.Infrastructure.Attributes; using Hit.Infrastructure.User; -using HitUnitTests.Worlds; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; @@ -8,14 +7,14 @@ namespace HitUnitTests.Configurations { [SysCon("system-with-configuration-no-sections-1", JsonPath = "configuration-no-sections-1.json")] [SysCon("system-with-configuration-no-sections-2", JsonPath = "configuration-no-sections-2.json")] - [SysCon("system-with-configuration-sections-part1", JsonPath = "configuration-sections.json", ConfigurationSections = "Part1")] - [SysCon("system-with-configuration-sections-part2", JsonPath = "configuration-sections.json", ConfigurationSections = "Part2")] - public class SystemConfigurationForTestingReadingOfConfiguration : DefaultSystemConfigurationAdapter + [SysCon("system-with-configuration-sections-part1", JsonPath = "configuration-sections-1.json", ConfigurationSections = "Part1")] + [SysCon("system-with-configuration-sections-part2", JsonPath = "configuration-sections-1.json", ConfigurationSections = "Part2")] + public class SystemConfigurationForTestingReadingOfConfiguration1 : DefaultSystemConfigurationAdapter { public override IServiceCollection ConfigureServices(IServiceCollection services, IConfiguration configuration, SysCon meta, string currentLayer) { - var section = configuration.GetSection("ConfSetting"); - var confSetting = section.Get(); + var section = configuration.GetSection("ConfSetting1"); + var confSetting = section.Get(); if (confSetting != null) { services.AddSingleton(confSetting); @@ -26,4 +25,22 @@ public override IServiceCollection ConfigureServices(IServiceCollection services } + [SysCon("system-with-configuration-sections-multi", JsonPath = "configuration-sections-2.json", ConfigurationSections = "Part1, Part2")] + public class SystemConfigurationForTestingReadingOfConfiguration2 : DefaultSystemConfigurationAdapter + { + public override IServiceCollection ConfigureServices(IServiceCollection services, IConfiguration configuration, SysCon meta, string currentLayer) + { + var section1 = configuration.GetSection("ConfSetting1"); + var confSetting1 = section1.Get(); + services.AddSingleton(confSetting1); + + var section2 = configuration.GetSection("ConfSetting2"); + var confSetting2 = section2.Get(); + services.AddSingleton(confSetting2); + + return services; + } + + } + } diff --git a/src/HitUnitTests/Configurations/SystemConfigurationForTestingReadingOfConfigurationUserSecrets.cs b/src/HitUnitTests/Configurations/SystemConfigurationForTestingReadingOfConfigurationUserSecrets.cs index 9bbf7d1..054da0a 100644 --- a/src/HitUnitTests/Configurations/SystemConfigurationForTestingReadingOfConfigurationUserSecrets.cs +++ b/src/HitUnitTests/Configurations/SystemConfigurationForTestingReadingOfConfigurationUserSecrets.cs @@ -1,6 +1,5 @@ using Hit.Infrastructure.Attributes; using Hit.Infrastructure.User; -using HitUnitTests.Worlds; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; @@ -9,12 +8,12 @@ namespace HitUnitTests.Configurations [SysCon("system-with-configuration-user-secret", UserSecrets = true)] [SysCon("system-with-configuration-user-secret-part1", UserSecrets = true, ConfigurationSections = "Part1")] [SysCon("system-with-configuration-user-secret-part2", UserSecrets = true, ConfigurationSections = "Part2")] - public class SystemConfigurationForTestingReadingOfConfigurationUserSecrets : DefaultSystemConfigurationAdapter + public class SystemConfigurationForTestingReadingOfConfigurationUserSecrets1 : DefaultSystemConfigurationAdapter { public override IServiceCollection ConfigureServices(IServiceCollection services, IConfiguration configuration, SysCon meta, string currentLayer) { - var section = configuration.GetSection("ConfSetting"); - var confSetting = section.Get(); + var section = configuration.GetSection("ConfSetting1"); + var confSetting = section.Get(); if (confSetting != null) { services.AddSingleton(confSetting); @@ -25,4 +24,22 @@ public override IServiceCollection ConfigureServices(IServiceCollection services } + [SysCon("system-with-configuration-sections-file-and-user", UserSecrets = true, JsonPath = "configuration-sections-2.json", ConfigurationSections = "Part2, Part3")] + public class SystemConfigurationForTestingReadingOfConfigurationUserSecrets2 : DefaultSystemConfigurationAdapter + { + public override IServiceCollection ConfigureServices(IServiceCollection services, IConfiguration configuration, SysCon meta, string currentLayer) + { + var section2 = configuration.GetSection("ConfSetting2"); + var confSetting2 = section2.Get(); + services.AddSingleton(confSetting2); + + var section3 = configuration.GetSection("ConfSetting3"); + var confSetting3 = section3.Get(); + services.AddSingleton(confSetting3); + + return services; + } + + } + } diff --git a/src/HitUnitTests/HitUnitTests.csproj b/src/HitUnitTests/HitUnitTests.csproj index a452216..e7520c1 100644 --- a/src/HitUnitTests/HitUnitTests.csproj +++ b/src/HitUnitTests/HitUnitTests.csproj @@ -28,7 +28,10 @@ - + + Always + + Always diff --git a/src/HitUnitTests/TestLogic/TestHierarchies.cs b/src/HitUnitTests/TestLogic/TestHierarchies.cs index 328678b..4e66d18 100644 --- a/src/HitUnitTests/TestLogic/TestHierarchies.cs +++ b/src/HitUnitTests/TestLogic/TestHierarchies.cs @@ -2,7 +2,6 @@ using Hit.Infrastructure.User; using Hit.Specification.Infrastructure; using HitUnitTests.Configurations; -using HitUnitTests.Worlds; using Xunit; namespace HitUnitTests.TestLogic @@ -85,9 +84,9 @@ public class TestLogicImpl3 : UnitAsyncTestLogic [UseAs("AppSettingTest4", Options = "name = configuration-sections-part-2", UnitTest = "!")] public class TestLogicImpl4 : TestLogicBase { - private readonly ConfSetting _setting; + private readonly ConfSetting1 _setting; - public TestLogicImpl4(ConfSetting setting) => _setting = setting; + public TestLogicImpl4(ConfSetting1 setting) => _setting = setting; public override void Test(ITestContext context) { @@ -103,9 +102,9 @@ public override void Test(ITestContext context) [UseAs("AppSettingUserSecretTest3", Options = "name = configuration-user-secret-sections-part-2", UnitTest = "!")] public class TestLogicImpl5 : TestLogicBase { - private readonly ConfSetting _setting; + private readonly ConfSetting1 _setting; - public TestLogicImpl5(ConfSetting setting) => _setting = setting; + public TestLogicImpl5(ConfSetting1 setting) => _setting = setting; public override void Test(ITestContext context) { @@ -116,4 +115,56 @@ public override void Test(ITestContext context) } + [UseAs("AppSettingTest1", Options = "name1 = config1, name2 = config2", UnitTest = "!")] + public class TestLogicImpl6 : TestLogicBase + { + private readonly ConfSetting1 _setting1; + private readonly ConfSetting2 _setting2; + + public TestLogicImpl6(ConfSetting1 setting1, + ConfSetting2 setting2) + { + _setting1 = setting1; + _setting2 = setting2; + } + + public override void Test(ITestContext context) + { + Assert.NotNull(_setting1); + Assert.NotNull(_setting2); + + var expected1 = context.Options.Get("name1"); + Assert.Equal(expected1, _setting1.Name); + var expected2 = context.Options.Get("name2"); + Assert.Equal(expected2, _setting2.Name); + } + + } + + [UseAs("AppSettingTest1", Options = "name2 = config2, name3 = config3", UnitTest = "!")] + public class TestLogicImpl7 : TestLogicBase + { + private readonly ConfSetting2 _setting2; + private readonly ConfSetting3 _setting3; + + public TestLogicImpl7(ConfSetting2 setting2, + ConfSetting3 setting3) + { + _setting2 = setting2; + _setting3 = setting3; + } + + public override void Test(ITestContext context) + { + Assert.NotNull(_setting2); + Assert.NotNull(_setting3); + + var expected2 = context.Options.Get("name2"); + Assert.Equal(expected2, _setting2.Name); + var expected3 = context.Options.Get("name3"); + Assert.Equal(expected3, _setting3.Name); + } + + } + } diff --git a/src/HitUnitTests/UnitTest1_runningUnitTests.cs b/src/HitUnitTests/UnitTest1_runningUnitTests.cs index e50f56a..1f9a15f 100644 --- a/src/HitUnitTests/UnitTest1_runningUnitTests.cs +++ b/src/HitUnitTests/UnitTest1_runningUnitTests.cs @@ -1,7 +1,6 @@ using Hit.Infrastructure; using Hit.Specification.Infrastructure; using HitUnitTests.Assertions; -using HitUnitTests.Worlds; using System.Threading.Tasks; using Xunit; diff --git a/src/HitUnitTests/UnitTest2_runningSyncUnitTests.cs b/src/HitUnitTests/UnitTest2_runningSyncUnitTests.cs index 239d47e..8483ab0 100644 --- a/src/HitUnitTests/UnitTest2_runningSyncUnitTests.cs +++ b/src/HitUnitTests/UnitTest2_runningSyncUnitTests.cs @@ -1,7 +1,6 @@ using Hit.Infrastructure; using Hit.Specification.Infrastructure; using HitUnitTests.Assertions; -using HitUnitTests.Worlds; using System.Threading.Tasks; using Xunit; diff --git a/src/HitUnitTests/UnitTest3_runningUnitTests.cs b/src/HitUnitTests/UnitTest3_runningUnitTests.cs index 58d168d..f6b2af5 100644 --- a/src/HitUnitTests/UnitTest3_runningUnitTests.cs +++ b/src/HitUnitTests/UnitTest3_runningUnitTests.cs @@ -1,7 +1,6 @@ using Hit.Infrastructure; using Hit.Specification.Infrastructure; using HitUnitTests.Assertions; -using HitUnitTests.Worlds; using System.Threading.Tasks; using Xunit; diff --git a/src/HitUnitTests/UnitTests1_space.cs b/src/HitUnitTests/UnitTests1_space.cs index 556f657..cea22eb 100644 --- a/src/HitUnitTests/UnitTests1_space.cs +++ b/src/HitUnitTests/UnitTests1_space.cs @@ -1,6 +1,5 @@ using Hit.Infrastructure; using Hit.Specification.Infrastructure; -using HitUnitTests.Worlds; using System.Linq; using Xunit; diff --git a/src/HitUnitTests/UnitTests2_space.cs b/src/HitUnitTests/UnitTests2_space.cs index 59665d6..2132100 100644 --- a/src/HitUnitTests/UnitTests2_space.cs +++ b/src/HitUnitTests/UnitTests2_space.cs @@ -1,6 +1,5 @@ using Hit.Infrastructure; using Hit.Specification.Infrastructure; -using HitUnitTests.Worlds; using System.Linq; using Xunit; diff --git a/src/HitUnitTests/UnitTests3_space.cs b/src/HitUnitTests/UnitTests3_space.cs index 70a07b2..9be7682 100644 --- a/src/HitUnitTests/UnitTests3_space.cs +++ b/src/HitUnitTests/UnitTests3_space.cs @@ -1,6 +1,5 @@ using Hit.Infrastructure; using Hit.Specification.Infrastructure; -using HitUnitTests.Worlds; using System.Linq; using Xunit; diff --git a/src/HitUnitTests/UnitTests4.cs b/src/HitUnitTests/UnitTests4.cs index 3ef043b..91e49af 100644 --- a/src/HitUnitTests/UnitTests4.cs +++ b/src/HitUnitTests/UnitTests4.cs @@ -1,6 +1,5 @@ using Hit.Infrastructure; using Hit.Specification.Infrastructure; -using HitUnitTests.Worlds; using System.Threading.Tasks; using Xunit; @@ -19,6 +18,7 @@ public async Task UnitTestShouldNotFailAsync(string system, string unitTest) { var result = await _unitTestsSpace.RunUnitTestAsync(system, unitTest); UnitTestsUtil.AssertResult(result, system, string.Empty, unitTest); + UnitTestsUtil.AssertResult(result, system, string.Empty, unitTest); } } } diff --git a/src/HitUnitTests/UnitTests5.cs b/src/HitUnitTests/UnitTests5.cs index 60c9fea..7110960 100644 --- a/src/HitUnitTests/UnitTests5.cs +++ b/src/HitUnitTests/UnitTests5.cs @@ -1,6 +1,5 @@ using Hit.Infrastructure; using Hit.Specification.Infrastructure; -using HitUnitTests.Worlds; using System.Threading.Tasks; using Xunit; diff --git a/src/HitUnitTests/UnitTests6.cs b/src/HitUnitTests/UnitTests6.cs new file mode 100644 index 0000000..0973167 --- /dev/null +++ b/src/HitUnitTests/UnitTests6.cs @@ -0,0 +1,20 @@ +using Hit.Infrastructure; +using Hit.Specification.Infrastructure; +using System.Threading.Tasks; +using Xunit; + +namespace HitUnitTests +{ + public class UnitTests6 + { + private static readonly IUnitTestsSpace _unitTestsSpace = new UnitTestsSpace(); + + [Theory] + [InlineData("system-with-configuration-sections-multi", "AppSettingTest1")] + public async Task UnitTestShouldNotFailAsync(string system, string unitTest) + { + var result = await _unitTestsSpace.RunUnitTestAsync(system, unitTest); + UnitTestsUtil.AssertResult(result, system, string.Empty, unitTest); + } + } +} diff --git a/src/HitUnitTests/UnitTests7.cs b/src/HitUnitTests/UnitTests7.cs new file mode 100644 index 0000000..a508dc1 --- /dev/null +++ b/src/HitUnitTests/UnitTests7.cs @@ -0,0 +1,23 @@ +using Hit.Infrastructure; +using Hit.Specification.Infrastructure; +using System.Threading.Tasks; +using Xunit; + +namespace HitUnitTests +{ + public class UnitTests7 + { + private static readonly IUnitTestsSpace _unitTestsSpace = new UnitTestsSpace(); + + [Theory] + [InlineData("system-with-configuration-sections-file-and-user", "AppSettingTest1")] + public async Task UnitTestShouldNotFailAsync(string system, string unitTest) + { + if (UnitTestsUtil.InDevelopment) + { + var result = await _unitTestsSpace.RunUnitTestAsync(system, unitTest); + UnitTestsUtil.AssertResult(result, system, string.Empty, unitTest); + } + } + } +} diff --git a/src/HitUnitTests/Worlds.cs b/src/HitUnitTests/Worlds.cs new file mode 100644 index 0000000..7477dd7 --- /dev/null +++ b/src/HitUnitTests/Worlds.cs @@ -0,0 +1,38 @@ +using Hit.Specification.User; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HitUnitTests +{ + public class World1 : IWorldProvider + { + public World1 Get() => new(); + } + public class World2 : IWorldProvider + { + public World2 Get() => new(); + } + public class World3 : IWorldProvider + { + public World3 Get() => new(); + } + public class World4 : IWorldProvider + { + public World4 Get() => new(); + } + public class World5 : IWorldProvider + { + public World5 Get() => new(); + } + public class World6 : IWorldProvider + { + public World6 Get() => new(); + } + public class World7 : IWorldProvider + { + public World7 Get() => new(); + } +} diff --git a/src/HitUnitTests/Worlds/World1.cs b/src/HitUnitTests/Worlds/World1.cs deleted file mode 100644 index 1eeb024..0000000 --- a/src/HitUnitTests/Worlds/World1.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Hit.Specification.User; - -namespace HitUnitTests.Worlds -{ - public class World1 : IWorldProvider - { - public World1 Get() => new(); - } -} diff --git a/src/HitUnitTests/Worlds/World2.cs b/src/HitUnitTests/Worlds/World2.cs deleted file mode 100644 index 50ab811..0000000 --- a/src/HitUnitTests/Worlds/World2.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Hit.Specification.User; - -namespace HitUnitTests.Worlds -{ - public class World2 : IWorldProvider - { - public World2 Get() => new(); - } -} diff --git a/src/HitUnitTests/Worlds/World3.cs b/src/HitUnitTests/Worlds/World3.cs deleted file mode 100644 index 3de7c2c..0000000 --- a/src/HitUnitTests/Worlds/World3.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Hit.Specification.User; - -namespace HitUnitTests.Worlds -{ - public class World3 : IWorldProvider - { - public World3 Get() => new(); - } -} diff --git a/src/HitUnitTests/Worlds/World4.cs b/src/HitUnitTests/Worlds/World4.cs deleted file mode 100644 index 9ed6da8..0000000 --- a/src/HitUnitTests/Worlds/World4.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Hit.Specification.User; - -namespace HitUnitTests.Worlds -{ - public class World4 : IWorldProvider - { - public World4 Get() => new(); - } -} diff --git a/src/HitUnitTests/Worlds/World5.cs b/src/HitUnitTests/Worlds/World5.cs deleted file mode 100644 index 294dd5c..0000000 --- a/src/HitUnitTests/Worlds/World5.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Hit.Specification.User; - -namespace HitUnitTests.Worlds -{ - public class World5 : IWorldProvider - { - public World5 Get() => new(); - } -} diff --git a/src/HitUnitTests/configuration-no-sections-1.json b/src/HitUnitTests/configuration-no-sections-1.json index c2509e3..046dcdc 100644 --- a/src/HitUnitTests/configuration-no-sections-1.json +++ b/src/HitUnitTests/configuration-no-sections-1.json @@ -1,5 +1,5 @@ { - "ConfSetting": { + "ConfSetting1": { "Name": "configuration-no-sections-1" } } \ No newline at end of file diff --git a/src/HitUnitTests/configuration-no-sections-2.json b/src/HitUnitTests/configuration-no-sections-2.json index 7069210..d192671 100644 --- a/src/HitUnitTests/configuration-no-sections-2.json +++ b/src/HitUnitTests/configuration-no-sections-2.json @@ -1,5 +1,5 @@ { - "ConfSetting": { + "ConfSetting1": { "Name": "configuration-no-sections-2" } } \ No newline at end of file diff --git a/src/HitUnitTests/configuration-sections.json b/src/HitUnitTests/configuration-sections-1.json similarity index 76% rename from src/HitUnitTests/configuration-sections.json rename to src/HitUnitTests/configuration-sections-1.json index ebbbc49..790238c 100644 --- a/src/HitUnitTests/configuration-sections.json +++ b/src/HitUnitTests/configuration-sections-1.json @@ -1,11 +1,11 @@ { "Part1": { - "ConfSetting": { + "ConfSetting1": { "Name": "configuration-sections-part-1" } }, "Part2": { - "ConfSetting": { + "ConfSetting1": { "Name": "configuration-sections-part-2" } } diff --git a/src/HitUnitTests/configuration-sections-2.json b/src/HitUnitTests/configuration-sections-2.json new file mode 100644 index 0000000..ea12265 --- /dev/null +++ b/src/HitUnitTests/configuration-sections-2.json @@ -0,0 +1,12 @@ +{ + "Part1": { + "ConfSetting1": { + "Name": "config1" + } + }, + "Part2": { + "ConfSetting2": { + "Name": "config2" + } + } +} \ No newline at end of file diff --git a/src/HitUnitTests/secret.json b/src/HitUnitTests/secret.json new file mode 100644 index 0000000..60f3a8c --- /dev/null +++ b/src/HitUnitTests/secret.json @@ -0,0 +1,20 @@ +{ + "ConfSetting1": { + "Name": "configuration-user-secret" + }, + "Part1": { + "ConfSetting1": { + "Name": "configuration-user-secret-sections-part-1" + } + }, + "Part2": { + "ConfSetting1": { + "Name": "configuration-user-secret-sections-part-2" + } + }, + "Part3": { + "ConfSetting3": { + "Name": "config3" + } + } +}