commit d402013e29bee144c4a4e10682f047647574456e
Author: Tomáš Orlovský <orlovsky@students.zcu.cz>
Date:   Fri May 28 15:01:01 2021 +0200

    Added first tests on goals commands

diff --git a/Leuze.Tests.Modules.Goal/GoalDefinitionAreasTests.cs b/Leuze.Tests.Modules.Goal/GoalDefinitionAreasTests.cs
new file mode 100644
index 0000000..f1f1617
--- /dev/null
+++ b/Leuze.Tests.Modules.Goal/GoalDefinitionAreasTests.cs
@@ -0,0 +1,100 @@
+//#define TEST
+
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+using FluentAssertions;
+using Leuze.Core.Application.Authentication;
+using Leuze.Core.Domain.Repositories;
+using Leuze.Core.Infrastructure.Persistence.Repository;
+using Leuze.Core.Infrastructure.Persistence.Seeds;
+using Leuze.Modules.Goal.Application.CQRS.GoalDefinitionAreas.Commands;
+using Leuze.Modules.Goal.Domain.Repositories;
+using Leuze.Modules.Goal.Infrastructure.Persistence.Repositories;
+using Leuze.Tests.Configuration;
+using Microsoft.AspNetCore.Components.Authorization;
+using Microsoft.Extensions.DependencyInjection;
+using Moq;
+using Xunit;
+
+namespace Leuze.Tests.Modules.Goal
+{
+    [Trait("Category", "Goals")]
+    public class GoalDefinitionAreasTests : TestWithDatabase
+    {
+        public GoalDefinitionAreasTests()
+        {
+            var services = new ServiceCollection();
+            services.AddTransient<IGlobalDefinitionAreaRepository, GlobalDefinitionAreaRepository>();
+            services.AddTransient<IGoalItemRepository, GoalItemRepository>();
+            services.AddTransient<IGoalDefinitionRepository, GoalDefinitionRepository>();
+            services.AddTransient<IDomainUserRepository, DomainUserRepository>();
+            Initialize(services);
+
+            ApplicationSeed.Run(DatabaseFixture.Storage, DatabaseFixture.UserManager, DatabaseFixture.RoleManager);
+        }
+
+        [Fact]
+        public async void CreateNewAreaTestAdmin()
+        {
+            await _semaphore.WaitAsync();
+
+            var AuthenticationStateProviderMock = await TestUtils.AuthenticationMock(DatabaseFixture,TestUtils.adminName);
+            var handler = new CreateNewArea.Handler(
+                DatabaseFixture.Services.GetRequiredService<IGlobalDefinitionAreaRepository>(),
+                AuthenticationStateProviderMock.Object,
+                DatabaseFixture.Services.GetRequiredService<IDomainUserRepository>());
+            var result = await handler.Handle(new CreateNewArea.Command(DateTime.Today, DateTime.Today.AddDays(1), 0.0), default);
+
+            result.IsSuccess.Should().BeTrue();
+
+            _semaphore.Release();
+        }
+
+        //TODO: change user
+        [Fact]
+        public async void CreateNewAreaTestTL()
+        {
+            await _semaphore.WaitAsync();
+
+            var AuthenticationStateProviderMock = await TestUtils.AuthenticationMock(DatabaseFixture, TestUtils.adminName);
+            var handler = new CreateNewArea.Handler(
+                DatabaseFixture.Services.GetRequiredService<IGlobalDefinitionAreaRepository>(),
+                AuthenticationStateProviderMock.Object,
+                DatabaseFixture.Services.GetRequiredService<IDomainUserRepository>());
+            var result = await handler.Handle(new CreateNewArea.Command(DateTime.Today, DateTime.Today.AddDays(1), 0.0), default);
+
+            result.IsSuccess.Should().BeTrue();
+
+            _semaphore.Release();
+        }
+
+        //TODO: change user
+        [Fact]
+        public async void CreateNewAreaTestMA()
+        {
+            await _semaphore.WaitAsync();
+
+            var AuthenticationStateProviderMock = await TestUtils.AuthenticationMock(DatabaseFixture, TestUtils.adminName);
+            var handler = new CreateNewArea.Handler(
+                DatabaseFixture.Services.GetRequiredService<IGlobalDefinitionAreaRepository>(),
+                AuthenticationStateProviderMock.Object,
+                DatabaseFixture.Services.GetRequiredService<IDomainUserRepository>());
+            var result = await handler.Handle(new CreateNewArea.Command(DateTime.Today, DateTime.Today.AddDays(1), 0.0), default);
+
+            result.IsSuccess.Should().BeTrue();
+
+            _semaphore.Release();
+        }
+
+        //private async Task<Mock<AuthenticatedUserProvider>> AuthenticationMock(string username)
+        //{
+        //    var user = await DatabaseFixture.UserManager.FindByEmailAsync(username);
+        //    (user != null).Should().BeTrue();
+
+        //    var AuthenticationStateProviderMock = new Mock<AuthenticatedUserProvider>(Mock.Of<AuthenticationStateProvider>());
+        //    AuthenticationStateProviderMock.Setup(e => e.RequiredUserId).Returns(user.Id);
+        //    return AuthenticationStateProviderMock;
+        //}
+    }
+}
diff --git a/Leuze.Tests.Modules.Goal/GoalDefinitionsTests.cs b/Leuze.Tests.Modules.Goal/GoalDefinitionsTests.cs
new file mode 100644
index 0000000..9a0276e
--- /dev/null
+++ b/Leuze.Tests.Modules.Goal/GoalDefinitionsTests.cs
@@ -0,0 +1,10 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Leuze.Tests.Modules.Goal
+{
+    class GoalDefinitionsTests
+    {
+    }
+}
diff --git a/Leuze.Tests.Modules.Goal/GoalsTests.cs b/Leuze.Tests.Modules.Goal/GoalsTests.cs
new file mode 100644
index 0000000..ffdcb22
--- /dev/null
+++ b/Leuze.Tests.Modules.Goal/GoalsTests.cs
@@ -0,0 +1,10 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Leuze.Tests.Modules.Goal
+{
+    class GoalsTests
+    {
+    }
+}
diff --git a/Leuze.Tests.Modules.Goal/Leuze.Tests.Modules.Goal.csproj b/Leuze.Tests.Modules.Goal/Leuze.Tests.Modules.Goal.csproj
new file mode 100644
index 0000000..3e459d8
--- /dev/null
+++ b/Leuze.Tests.Modules.Goal/Leuze.Tests.Modules.Goal.csproj
@@ -0,0 +1,32 @@
+﻿<Project Sdk="Microsoft.NET.Sdk">
+
+  <PropertyGroup>
+    <TargetFramework>net5.0</TargetFramework>
+
+    <IsPackable>false</IsPackable>
+    <DefineConstants>TEST</DefineConstants>
+    <Configurations>Debug;Release;Test</Configurations>
+  </PropertyGroup>
+
+  <ItemGroup>
+    <PackageReference Include="FluentAssertions" Version="5.10.3" />
+    <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.10.0" />
+    <PackageReference Include="Moq" Version="4.16.1" />
+    <PackageReference Include="xunit" Version="2.4.1" />
+    <PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
+      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
+      <PrivateAssets>all</PrivateAssets>
+    </PackageReference>
+    <PackageReference Include="coverlet.collector" Version="3.0.3">
+      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
+      <PrivateAssets>all</PrivateAssets>
+    </PackageReference>
+  </ItemGroup>
+
+  <ItemGroup>
+    <ProjectReference Include="..\src\Modules\Goal\Application\Leuze.Modules.Goal.Application\Leuze.Modules.Goal.Application.csproj" />
+    <ProjectReference Include="..\src\Modules\Goal\Infrastructure\Leuze.Modules.Goal.Infrastructure.Persistence\Leuze.Modules.Goal.Infrastructure.Persistence.csproj" />
+    <ProjectReference Include="..\tests\Leuze.Tests.Configuration\Leuze.Tests.Configuration.csproj" />
+  </ItemGroup>
+
+</Project>
diff --git a/Leuze.Tests.Modules.Goal/TestUtils.cs b/Leuze.Tests.Modules.Goal/TestUtils.cs
new file mode 100644
index 0000000..84fd2c3
--- /dev/null
+++ b/Leuze.Tests.Modules.Goal/TestUtils.cs
@@ -0,0 +1,30 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using FluentAssertions;
+using Leuze.Core.Application.Authentication;
+using Leuze.Tests.Configuration;
+using Microsoft.AspNetCore.Components.Authorization;
+using Moq;
+
+namespace Leuze.Tests.Modules.Goal
+{
+    public static class TestUtils
+    {
+        public const string adminName = "admin@test.cz";
+        public const string TLName = "silent@test.cz";
+        public const string MAName = "orlicek@test.cz";
+
+        public static async Task<Mock<AuthenticatedUserProvider>> AuthenticationMock(DatabaseInMemoryFixture DatabaseFixture, string username)
+        {
+            var user = await DatabaseFixture.UserManager.FindByEmailAsync(username);
+            (user != null).Should().BeTrue();
+
+            var AuthenticationStateProviderMock = new Mock<AuthenticatedUserProvider>(Mock.Of<AuthenticationStateProvider>());
+            AuthenticationStateProviderMock.Setup(e => e.RequiredUserId).Returns(user.Id);
+            return AuthenticationStateProviderMock;
+        }
+    }
+}
diff --git a/Leuze.sln b/Leuze.sln
index 150e6c5..fc33a04 100644
--- a/Leuze.sln
+++ b/Leuze.sln
@@ -53,64 +53,101 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Leuze.Modules.Goal.Domain",
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Leuze.Modules.Goal.Infrastructure.Persistence", "src\Modules\Goal\Infrastructure\Leuze.Modules.Goal.Infrastructure.Persistence\Leuze.Modules.Goal.Infrastructure.Persistence.csproj", "{BEBFBA58-BCB7-4F44-9247-EAAAE748176A}"
 EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Goals", "Goals", "{B89031F6-163B-417B-B90E-2DC90A30E7A1}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Leuze.Tests.Modules.Goal", "Leuze.Tests.Modules.Goal\Leuze.Tests.Modules.Goal.csproj", "{2824A507-5BBD-44B7-9F3A-643F29C7E597}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
 		Release|Any CPU = Release|Any CPU
+		Test|Any CPU = Test|Any CPU
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
 		{B316B6E4-2898-4F23-9D96-97A90F41BFDC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{B316B6E4-2898-4F23-9D96-97A90F41BFDC}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{B316B6E4-2898-4F23-9D96-97A90F41BFDC}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{B316B6E4-2898-4F23-9D96-97A90F41BFDC}.Release|Any CPU.Build.0 = Release|Any CPU
+		{B316B6E4-2898-4F23-9D96-97A90F41BFDC}.Test|Any CPU.ActiveCfg = Test|Any CPU
+		{B316B6E4-2898-4F23-9D96-97A90F41BFDC}.Test|Any CPU.Build.0 = Test|Any CPU
 		{66EEF1C2-9476-4FF6-86F7-2C1035C7DC66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{66EEF1C2-9476-4FF6-86F7-2C1035C7DC66}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{66EEF1C2-9476-4FF6-86F7-2C1035C7DC66}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{66EEF1C2-9476-4FF6-86F7-2C1035C7DC66}.Release|Any CPU.Build.0 = Release|Any CPU
+		{66EEF1C2-9476-4FF6-86F7-2C1035C7DC66}.Test|Any CPU.ActiveCfg = Debug|Any CPU
+		{66EEF1C2-9476-4FF6-86F7-2C1035C7DC66}.Test|Any CPU.Build.0 = Debug|Any CPU
 		{D4908C8E-6488-457B-B045-4D769D9ACA76}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{D4908C8E-6488-457B-B045-4D769D9ACA76}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{D4908C8E-6488-457B-B045-4D769D9ACA76}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{D4908C8E-6488-457B-B045-4D769D9ACA76}.Release|Any CPU.Build.0 = Release|Any CPU
+		{D4908C8E-6488-457B-B045-4D769D9ACA76}.Test|Any CPU.ActiveCfg = Test|Any CPU
+		{D4908C8E-6488-457B-B045-4D769D9ACA76}.Test|Any CPU.Build.0 = Test|Any CPU
 		{B443BE7B-7A75-4BAE-872B-85C13D528C3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{B443BE7B-7A75-4BAE-872B-85C13D528C3C}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{B443BE7B-7A75-4BAE-872B-85C13D528C3C}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{B443BE7B-7A75-4BAE-872B-85C13D528C3C}.Release|Any CPU.Build.0 = Release|Any CPU
+		{B443BE7B-7A75-4BAE-872B-85C13D528C3C}.Test|Any CPU.ActiveCfg = Test|Any CPU
+		{B443BE7B-7A75-4BAE-872B-85C13D528C3C}.Test|Any CPU.Build.0 = Test|Any CPU
 		{3926F2A1-547E-48E4-B87F-29C21E7FC625}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{3926F2A1-547E-48E4-B87F-29C21E7FC625}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{3926F2A1-547E-48E4-B87F-29C21E7FC625}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{3926F2A1-547E-48E4-B87F-29C21E7FC625}.Release|Any CPU.Build.0 = Release|Any CPU
+		{3926F2A1-547E-48E4-B87F-29C21E7FC625}.Test|Any CPU.ActiveCfg = Test|Any CPU
+		{3926F2A1-547E-48E4-B87F-29C21E7FC625}.Test|Any CPU.Build.0 = Test|Any CPU
 		{674168B3-2D4C-4746-A1A7-FE890BD59C1A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{674168B3-2D4C-4746-A1A7-FE890BD59C1A}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{674168B3-2D4C-4746-A1A7-FE890BD59C1A}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{674168B3-2D4C-4746-A1A7-FE890BD59C1A}.Release|Any CPU.Build.0 = Release|Any CPU
+		{674168B3-2D4C-4746-A1A7-FE890BD59C1A}.Test|Any CPU.ActiveCfg = Debug|Any CPU
+		{674168B3-2D4C-4746-A1A7-FE890BD59C1A}.Test|Any CPU.Build.0 = Debug|Any CPU
 		{D037B7D3-CA28-4EBD-9E2F-3F3D347950CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{D037B7D3-CA28-4EBD-9E2F-3F3D347950CF}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{D037B7D3-CA28-4EBD-9E2F-3F3D347950CF}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{D037B7D3-CA28-4EBD-9E2F-3F3D347950CF}.Release|Any CPU.Build.0 = Release|Any CPU
+		{D037B7D3-CA28-4EBD-9E2F-3F3D347950CF}.Test|Any CPU.ActiveCfg = Test|Any CPU
+		{D037B7D3-CA28-4EBD-9E2F-3F3D347950CF}.Test|Any CPU.Build.0 = Test|Any CPU
 		{8ECAEA01-61F3-402D-B94E-E54FC0C94C8E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{8ECAEA01-61F3-402D-B94E-E54FC0C94C8E}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{8ECAEA01-61F3-402D-B94E-E54FC0C94C8E}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{8ECAEA01-61F3-402D-B94E-E54FC0C94C8E}.Release|Any CPU.Build.0 = Release|Any CPU
+		{8ECAEA01-61F3-402D-B94E-E54FC0C94C8E}.Test|Any CPU.ActiveCfg = Test|Any CPU
+		{8ECAEA01-61F3-402D-B94E-E54FC0C94C8E}.Test|Any CPU.Build.0 = Test|Any CPU
 		{D271989D-921D-486B-929C-6BBF1EC0EED4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{D271989D-921D-486B-929C-6BBF1EC0EED4}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{D271989D-921D-486B-929C-6BBF1EC0EED4}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{D271989D-921D-486B-929C-6BBF1EC0EED4}.Release|Any CPU.Build.0 = Release|Any CPU
+		{D271989D-921D-486B-929C-6BBF1EC0EED4}.Test|Any CPU.ActiveCfg = Test|Any CPU
+		{D271989D-921D-486B-929C-6BBF1EC0EED4}.Test|Any CPU.Build.0 = Test|Any CPU
 		{C49CA0F7-C0C2-4FCE-98C4-4E42765B4405}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{C49CA0F7-C0C2-4FCE-98C4-4E42765B4405}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{C49CA0F7-C0C2-4FCE-98C4-4E42765B4405}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{C49CA0F7-C0C2-4FCE-98C4-4E42765B4405}.Release|Any CPU.Build.0 = Release|Any CPU
+		{C49CA0F7-C0C2-4FCE-98C4-4E42765B4405}.Test|Any CPU.ActiveCfg = Test|Any CPU
+		{C49CA0F7-C0C2-4FCE-98C4-4E42765B4405}.Test|Any CPU.Build.0 = Test|Any CPU
 		{C6F9EFF2-30DA-4FA9-AEFF-4957F0260267}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{C6F9EFF2-30DA-4FA9-AEFF-4957F0260267}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{C6F9EFF2-30DA-4FA9-AEFF-4957F0260267}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{C6F9EFF2-30DA-4FA9-AEFF-4957F0260267}.Release|Any CPU.Build.0 = Release|Any CPU
+		{C6F9EFF2-30DA-4FA9-AEFF-4957F0260267}.Test|Any CPU.ActiveCfg = Test|Any CPU
+		{C6F9EFF2-30DA-4FA9-AEFF-4957F0260267}.Test|Any CPU.Build.0 = Test|Any CPU
 		{BAAC1AB6-C671-408C-94EF-96459D5403DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{BAAC1AB6-C671-408C-94EF-96459D5403DD}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{BAAC1AB6-C671-408C-94EF-96459D5403DD}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{BAAC1AB6-C671-408C-94EF-96459D5403DD}.Release|Any CPU.Build.0 = Release|Any CPU
+		{BAAC1AB6-C671-408C-94EF-96459D5403DD}.Test|Any CPU.ActiveCfg = Test|Any CPU
+		{BAAC1AB6-C671-408C-94EF-96459D5403DD}.Test|Any CPU.Build.0 = Test|Any CPU
 		{BEBFBA58-BCB7-4F44-9247-EAAAE748176A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{BEBFBA58-BCB7-4F44-9247-EAAAE748176A}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{BEBFBA58-BCB7-4F44-9247-EAAAE748176A}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{BEBFBA58-BCB7-4F44-9247-EAAAE748176A}.Release|Any CPU.Build.0 = Release|Any CPU
+		{BEBFBA58-BCB7-4F44-9247-EAAAE748176A}.Test|Any CPU.ActiveCfg = Test|Any CPU
+		{BEBFBA58-BCB7-4F44-9247-EAAAE748176A}.Test|Any CPU.Build.0 = Test|Any CPU
+		{2824A507-5BBD-44B7-9F3A-643F29C7E597}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{2824A507-5BBD-44B7-9F3A-643F29C7E597}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{2824A507-5BBD-44B7-9F3A-643F29C7E597}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{2824A507-5BBD-44B7-9F3A-643F29C7E597}.Release|Any CPU.Build.0 = Release|Any CPU
+		{2824A507-5BBD-44B7-9F3A-643F29C7E597}.Test|Any CPU.ActiveCfg = Test|Any CPU
+		{2824A507-5BBD-44B7-9F3A-643F29C7E597}.Test|Any CPU.Build.0 = Test|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
@@ -137,6 +174,8 @@ Global
 		{C6F9EFF2-30DA-4FA9-AEFF-4957F0260267} = {1AEE9C09-804F-4AF7-B966-80830B39C85F}
 		{BAAC1AB6-C671-408C-94EF-96459D5403DD} = {4A441C7D-2659-4FB5-8886-420728C229BF}
 		{BEBFBA58-BCB7-4F44-9247-EAAAE748176A} = {E4134FEF-ECBC-4EEF-A65B-8E8D318DA8DA}
+		{B89031F6-163B-417B-B90E-2DC90A30E7A1} = {C5588326-929D-42B3-912B-9D838373B48E}
+		{2824A507-5BBD-44B7-9F3A-643F29C7E597} = {B89031F6-163B-417B-B90E-2DC90A30E7A1}
 	EndGlobalSection
 	GlobalSection(ExtensibilityGlobals) = postSolution
 		SolutionGuid = {849C3668-1CB9-4F98-ADFA-A71F5629384C}
diff --git a/src/Core/Application/Leuze.Core.Application.Identity/Leuze.Core.Application.Identity.csproj b/src/Core/Application/Leuze.Core.Application.Identity/Leuze.Core.Application.Identity.csproj
index c880838..29b447d 100644
--- a/src/Core/Application/Leuze.Core.Application.Identity/Leuze.Core.Application.Identity.csproj
+++ b/src/Core/Application/Leuze.Core.Application.Identity/Leuze.Core.Application.Identity.csproj
@@ -5,6 +5,7 @@
     <RootNamespace>Leuze.Core.Application.Identity</RootNamespace>
     <Product></Product>
     <Description></Description>
+    <Configurations>Debug;Release;Test</Configurations>
   </PropertyGroup>
 
   <PropertyGroup>
@@ -18,6 +19,11 @@
     <DocumentationFile>..\..\..\..\docs\Leuze.Core.Application.Identity.xml</DocumentationFile>
   </PropertyGroup>
 
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Test|AnyCPU'">
+    <OutputPath>..\..\..\Presentation\Leuze.Modules\</OutputPath>
+    <DocumentationFile>..\..\..\..\docs\Leuze.Core.Application.Identity.xml</DocumentationFile>
+  </PropertyGroup>
+
   <ItemGroup>
     <PackageReference Include="ExtCore.Data.Entities.Abstractions" Version="6.0.0" />
     <PackageReference Include="Microsoft.Extensions.Identity.Core" Version="5.0.4" />
diff --git a/src/Core/Application/Leuze.Core.Application.UI/Leuze.Core.Application.UI.csproj b/src/Core/Application/Leuze.Core.Application.UI/Leuze.Core.Application.UI.csproj
index aaa4a34..e78c763 100644
--- a/src/Core/Application/Leuze.Core.Application.UI/Leuze.Core.Application.UI.csproj
+++ b/src/Core/Application/Leuze.Core.Application.UI/Leuze.Core.Application.UI.csproj
@@ -5,6 +5,7 @@
     <RootNamespace>Leuze.Core.Application.UI</RootNamespace>
     <Product></Product>
     <Description></Description>
+    <Configurations>Debug;Release;Test</Configurations>
   </PropertyGroup>
 
   <PropertyGroup>
@@ -21,6 +22,12 @@
     <DocumentationFile>..\..\..\..\docs\Leuze.Core.Application.xml</DocumentationFile>
   </PropertyGroup>
 
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Test|AnyCPU'">
+    <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
+    <OutputPath>..\..\..\Presentation\Leuze.Modules\</OutputPath>
+    <DocumentationFile>..\..\..\..\docs\Leuze.Core.Application.xml</DocumentationFile>
+  </PropertyGroup>
+
   <ItemGroup>
     <PackageReference Include="Blazored.Toast" Version="3.1.2" />
     <PackageReference Include="Blazored.Typeahead" Version="4.6.0" />
diff --git a/src/Core/Application/Leuze.Core.Application/Authentication/AuthenticatedUserProvider.cs b/src/Core/Application/Leuze.Core.Application/Authentication/AuthenticatedUserProvider.cs
index 0790252..2957d9e 100644
--- a/src/Core/Application/Leuze.Core.Application/Authentication/AuthenticatedUserProvider.cs
+++ b/src/Core/Application/Leuze.Core.Application/Authentication/AuthenticatedUserProvider.cs
@@ -26,7 +26,7 @@ namespace Leuze.Core.Application.Authentication
             private set { }
         }
 
-        public Guid RequiredUserId
+        public virtual Guid RequiredUserId
         {
             get
             {
diff --git a/src/Core/Application/Leuze.Core.Application/Leuze.Core.Application.csproj b/src/Core/Application/Leuze.Core.Application/Leuze.Core.Application.csproj
index 23e76d3..75ed5af 100644
--- a/src/Core/Application/Leuze.Core.Application/Leuze.Core.Application.csproj
+++ b/src/Core/Application/Leuze.Core.Application/Leuze.Core.Application.csproj
@@ -5,6 +5,7 @@
     <RootNamespace>Leuze.Core.Application</RootNamespace>
     <Product></Product>
     <Description></Description>
+    <Configurations>Debug;Release;Test</Configurations>
   </PropertyGroup>
 
   <PropertyGroup>
@@ -18,6 +19,11 @@
     <DocumentationFile>..\..\..\..\docs\Leuze.Core.Application.xml</DocumentationFile>
   </PropertyGroup>
 
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Test|AnyCPU'">
+    <OutputPath>..\..\..\Presentation\Leuze.Modules\</OutputPath>
+    <DocumentationFile>..\..\..\..\docs\Leuze.Core.Application.xml</DocumentationFile>
+  </PropertyGroup>
+
   <ItemGroup>
     <PackageReference Include="AutoMapper" Version="10.1.1" />
     <PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="8.1.1" />
diff --git a/src/Core/Domain/Leuze.Core.Domain/Leuze.Core.Domain.csproj b/src/Core/Domain/Leuze.Core.Domain/Leuze.Core.Domain.csproj
index ba2e7f0..ef29da1 100644
--- a/src/Core/Domain/Leuze.Core.Domain/Leuze.Core.Domain.csproj
+++ b/src/Core/Domain/Leuze.Core.Domain/Leuze.Core.Domain.csproj
@@ -5,6 +5,7 @@
     <RootNamespace>Leuze.Core.Domain</RootNamespace>
     <Product></Product>
     <Description></Description>
+    <Configurations>Debug;Release;Test</Configurations>
   </PropertyGroup>
 
   <PropertyGroup>
@@ -18,6 +19,11 @@
     <DocumentationFile>..\..\..\..\docs\Leuze.Core.Domain.xml</DocumentationFile>
   </PropertyGroup>
 
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Test|AnyCPU'">
+    <OutputPath>..\..\..\Presentation\Leuze.Modules\</OutputPath>
+    <DocumentationFile>..\..\..\..\docs\Leuze.Core.Domain.xml</DocumentationFile>
+  </PropertyGroup>
+
   <ItemGroup>
     <PackageReference Include="ExtCore.Data.Abstractions" Version="6.0.0" />
     <PackageReference Include="ExtCore.Data.Entities.Abstractions" Version="6.0.0" />
diff --git a/src/Core/Infrastructure/Leuze.Core.Infrastructure.Persistence/Leuze.Core.Infrastructure.Persistence.csproj b/src/Core/Infrastructure/Leuze.Core.Infrastructure.Persistence/Leuze.Core.Infrastructure.Persistence.csproj
index 5ce0593..d284118 100644
--- a/src/Core/Infrastructure/Leuze.Core.Infrastructure.Persistence/Leuze.Core.Infrastructure.Persistence.csproj
+++ b/src/Core/Infrastructure/Leuze.Core.Infrastructure.Persistence/Leuze.Core.Infrastructure.Persistence.csproj
@@ -5,6 +5,7 @@
     <RootNamespace>Leuze.Core.Infrastructure.Persistence</RootNamespace>
     <Product></Product>
     <Description></Description>
+    <Configurations>Debug;Release;Test</Configurations>
   </PropertyGroup>
 
   <PropertyGroup>
@@ -18,6 +19,11 @@
     <DocumentationFile>..\..\..\..\docs\Leuze.Core.Infrastructure.Persistence.xml</DocumentationFile>
   </PropertyGroup>
 
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Test|AnyCPU'">
+    <OutputPath>..\..\..\Presentation\Leuze.Modules\</OutputPath>
+    <DocumentationFile>..\..\..\..\docs\Leuze.Core.Infrastructure.Persistence.xml</DocumentationFile>
+  </PropertyGroup>
+
   <ItemGroup>
     <PackageReference Include="EntityFramework" Version="6.4.4" />
     <PackageReference Include="ExtCore.Data.EntityFramework" Version="6.0.0" />
diff --git a/src/Modules/Goal/Application/Leuze.Modules.Goal.Application.UI/Leuze.Modules.Goal.Application.UI.csproj b/src/Modules/Goal/Application/Leuze.Modules.Goal.Application.UI/Leuze.Modules.Goal.Application.UI.csproj
index 5e9e8cd..8163df0 100644
--- a/src/Modules/Goal/Application/Leuze.Modules.Goal.Application.UI/Leuze.Modules.Goal.Application.UI.csproj
+++ b/src/Modules/Goal/Application/Leuze.Modules.Goal.Application.UI/Leuze.Modules.Goal.Application.UI.csproj
@@ -5,6 +5,7 @@
     <RootNamespace>Leuze.Modules.Goal.Application.UI</RootNamespace>
     <Product></Product>
     <Description></Description>
+    <Configurations>Debug;Release;Test</Configurations>
   </PropertyGroup>
 
   <PropertyGroup>
@@ -19,6 +20,11 @@
     <DocumentationFile>..\..\..\..\..\docs\Leuze.Modules.Goal.Application.UI.xml</DocumentationFile>
   </PropertyGroup>
 
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Test|AnyCPU'">
+    <OutputPath>..\..\..\..\Presentation\Leuze.Modules\</OutputPath>
+    <DocumentationFile>..\..\..\..\..\docs\Leuze.Modules.Goal.Application.UI.xml</DocumentationFile>
+  </PropertyGroup>
+
   <ItemGroup>
     <ProjectReference Include="..\..\..\..\Core\Application\Leuze.Core.Application.UI\Leuze.Core.Application.UI.csproj" />
     <ProjectReference Include="..\Leuze.Modules.Goal.Application\Leuze.Modules.Goal.Application.csproj" />
diff --git a/src/Modules/Goal/Application/Leuze.Modules.Goal.Application/CQRS/GoalDefinitionAreas/Commands/CreateNewArea.cs b/src/Modules/Goal/Application/Leuze.Modules.Goal.Application/CQRS/GoalDefinitionAreas/Commands/CreateNewArea.cs
index 3c87414..638b3ca 100644
--- a/src/Modules/Goal/Application/Leuze.Modules.Goal.Application/CQRS/GoalDefinitionAreas/Commands/CreateNewArea.cs
+++ b/src/Modules/Goal/Application/Leuze.Modules.Goal.Application/CQRS/GoalDefinitionAreas/Commands/CreateNewArea.cs
@@ -10,6 +10,7 @@ using System.Security.Claims;
 using System.Text;
 using System.Threading;
 using System.Threading.Tasks;
+using Leuze.Core.Application.Authentication;
 
 namespace Leuze.Modules.Goal.Application.CQRS.GoalDefinitionAreas.Commands
 {
@@ -23,10 +24,10 @@ namespace Leuze.Modules.Goal.Application.CQRS.GoalDefinitionAreas.Commands
         public class Handler : IBaseRequestHandler<Command, Response>
         {
             private readonly IGlobalDefinitionAreaRepository _gdAreaRepo;
-            private readonly AuthenticationStateProvider _authenticationStateProvider;
+            private readonly AuthenticatedUserProvider _authenticationStateProvider;
             private readonly IDomainUserRepository _domainUserRepo;
 
-            public Handler(IGlobalDefinitionAreaRepository gdAreaRepo, AuthenticationStateProvider authStateProvider, IDomainUserRepository domainUserRepo)
+            public Handler(IGlobalDefinitionAreaRepository gdAreaRepo, AuthenticatedUserProvider authStateProvider, IDomainUserRepository domainUserRepo)
             {
                 _gdAreaRepo = gdAreaRepo;
                 _authenticationStateProvider = authStateProvider;
@@ -40,8 +41,7 @@ namespace Leuze.Modules.Goal.Application.CQRS.GoalDefinitionAreas.Commands
                     return RequestResponse<Response>.CreateErrorResponse($"Zadán nevalidní rozsah!");
                 }
 
-                var state = await _authenticationStateProvider.GetAuthenticationStateAsync();
-                var id = Guid.Parse(state.User!.FindFirst(ClaimTypes.NameIdentifier)!.Value);
+                var id = _authenticationStateProvider.RequiredUserId;
                 var user = await _domainUserRepo.GetByIdAsync(id);
                 var alreadyExistingAreas = await _gdAreaRepo.GetAllWithinTimeRange(request.from, request.to);
 
diff --git a/src/Modules/Goal/Application/Leuze.Modules.Goal.Application/CQRS/GoalDefinitions/Queries/GetAllForArea.cs b/src/Modules/Goal/Application/Leuze.Modules.Goal.Application/CQRS/GoalDefinitions/Queries/GetAllForArea.cs
index d768324..971e884 100644
--- a/src/Modules/Goal/Application/Leuze.Modules.Goal.Application/CQRS/GoalDefinitions/Queries/GetAllForArea.cs
+++ b/src/Modules/Goal/Application/Leuze.Modules.Goal.Application/CQRS/GoalDefinitions/Queries/GetAllForArea.cs
@@ -10,6 +10,7 @@ using System.Security.Claims;
 using System.Text;
 using System.Threading;
 using System.Threading.Tasks;
+using Leuze.Core.Application.Authentication;
 
 namespace Leuze.Modules.Goal.Application.CQRS.GoalDefinitions.Queries
 {
@@ -23,10 +24,10 @@ namespace Leuze.Modules.Goal.Application.CQRS.GoalDefinitions.Queries
         public class Handler : IBaseRequestHandler<Query, Response>
         {
             private readonly IGoalDefinitionRepository _goalDefinitionRepo;
-            private readonly AuthenticationStateProvider _authenticationStateProvider;
+            private readonly AuthenticatedUserProvider _authenticationStateProvider;
             private readonly IDomainUserRepository _domainUserRepo;
 
-            public Handler(IDomainUserRepository domainUserRepo, AuthenticationStateProvider authStateProvider, IGoalDefinitionRepository goalDefinitionRepo)
+            public Handler(IDomainUserRepository domainUserRepo, AuthenticatedUserProvider authStateProvider, IGoalDefinitionRepository goalDefinitionRepo)
             {
                 _goalDefinitionRepo = goalDefinitionRepo;
                 _domainUserRepo = domainUserRepo;
@@ -35,8 +36,7 @@ namespace Leuze.Modules.Goal.Application.CQRS.GoalDefinitions.Queries
 
             public async Task<RequestResponse<Response>> Handle(Query request, CancellationToken cancellationToken)
             {
-                var state = await _authenticationStateProvider.GetAuthenticationStateAsync();
-                var id = Guid.Parse(state.User!.FindFirst(ClaimTypes.NameIdentifier)!.Value);
+                var id = _authenticationStateProvider.RequiredUserId;
                 var userShortDto = await _domainUserRepo.GetDtoByIdAsync(id);
 
                 if(userShortDto == null)
diff --git a/src/Modules/Goal/Application/Leuze.Modules.Goal.Application/Leuze.Modules.Goal.Application.csproj b/src/Modules/Goal/Application/Leuze.Modules.Goal.Application/Leuze.Modules.Goal.Application.csproj
index f374c63..cc6de85 100644
--- a/src/Modules/Goal/Application/Leuze.Modules.Goal.Application/Leuze.Modules.Goal.Application.csproj
+++ b/src/Modules/Goal/Application/Leuze.Modules.Goal.Application/Leuze.Modules.Goal.Application.csproj
@@ -5,6 +5,7 @@
     <RootNamespace>Leuze.Modules.Goal.Application</RootNamespace>
     <Product></Product>
     <Description></Description>
+    <Configurations>Debug;Release;Test</Configurations>
   </PropertyGroup>
 
   <PropertyGroup>
@@ -18,6 +19,11 @@
     <DocumentationFile>..\..\..\..\..\docs\Leuze.Modules.Goal.Application.xml</DocumentationFile>
   </PropertyGroup>
 
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Test|AnyCPU'">
+    <OutputPath>..\..\..\..\Presentation\Leuze.Modules\</OutputPath>
+    <DocumentationFile>..\..\..\..\..\docs\Leuze.Modules.Goal.Application.xml</DocumentationFile>
+  </PropertyGroup>
+
   <ItemGroup>
     <ProjectReference Include="..\..\..\..\Core\Application\Leuze.Core.Application\Leuze.Core.Application.csproj" />
     <ProjectReference Include="..\..\Domain\Leuze.Modules.Goal.Domain\Leuze.Modules.Goal.Domain.csproj" />
diff --git a/src/Modules/Goal/Domain/Leuze.Modules.Goal.Domain/Leuze.Modules.Goal.Domain.csproj b/src/Modules/Goal/Domain/Leuze.Modules.Goal.Domain/Leuze.Modules.Goal.Domain.csproj
index ca45641..1d30877 100644
--- a/src/Modules/Goal/Domain/Leuze.Modules.Goal.Domain/Leuze.Modules.Goal.Domain.csproj
+++ b/src/Modules/Goal/Domain/Leuze.Modules.Goal.Domain/Leuze.Modules.Goal.Domain.csproj
@@ -5,6 +5,7 @@
     <RootNamespace>Leuze.Modules.Goal.Domain</RootNamespace>
     <Product></Product>
     <Description></Description>
+    <Configurations>Debug;Release;Test</Configurations>
   </PropertyGroup>
 
   <PropertyGroup>
@@ -18,6 +19,11 @@
     <DocumentationFile>..\..\..\..\..\docs\Leuze.Modules.Goal.Domain.xml</DocumentationFile>
   </PropertyGroup>
 
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Test|AnyCPU'">
+    <OutputPath>..\..\..\..\Presentation\Leuze.Modules\</OutputPath>
+    <DocumentationFile>..\..\..\..\..\docs\Leuze.Modules.Goal.Domain.xml</DocumentationFile>
+  </PropertyGroup>
+
   <ItemGroup>
     <ProjectReference Include="..\..\..\..\Core\Domain\Leuze.Core.Domain\Leuze.Core.Domain.csproj" />
   </ItemGroup>
diff --git a/src/Modules/Goal/Infrastructure/Leuze.Modules.Goal.Infrastructure.Persistence/Leuze.Modules.Goal.Infrastructure.Persistence.csproj b/src/Modules/Goal/Infrastructure/Leuze.Modules.Goal.Infrastructure.Persistence/Leuze.Modules.Goal.Infrastructure.Persistence.csproj
index 6d59db4..da63a8d 100644
--- a/src/Modules/Goal/Infrastructure/Leuze.Modules.Goal.Infrastructure.Persistence/Leuze.Modules.Goal.Infrastructure.Persistence.csproj
+++ b/src/Modules/Goal/Infrastructure/Leuze.Modules.Goal.Infrastructure.Persistence/Leuze.Modules.Goal.Infrastructure.Persistence.csproj
@@ -5,6 +5,7 @@
     <RootNamespace>Leuze.Modules.Goal.Infrastructure.Persistence</RootNamespace>
     <Product></Product>
     <Description></Description>
+    <Configurations>Debug;Release;Test</Configurations>
   </PropertyGroup>
 
   <PropertyGroup>
@@ -18,6 +19,11 @@
     <DocumentationFile>..\..\..\..\..\docs\Leuze.Modules.Goal.Infrastructure.Persistence.xml</DocumentationFile>
   </PropertyGroup>
 
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Test|AnyCPU'">
+    <OutputPath>..\..\..\..\Presentation\Leuze.Modules\</OutputPath>
+    <DocumentationFile>..\..\..\..\..\docs\Leuze.Modules.Goal.Infrastructure.Persistence.xml</DocumentationFile>
+  </PropertyGroup>
+
   <ItemGroup>
     <ProjectReference Include="..\..\..\..\Core\Infrastructure\Leuze.Core.Infrastructure.Persistence\Leuze.Core.Infrastructure.Persistence.csproj" />
     <ProjectReference Include="..\..\Domain\Leuze.Modules.Goal.Domain\Leuze.Modules.Goal.Domain.csproj" />
diff --git a/src/Presentation/Leuze.App/Leuze.App.csproj b/src/Presentation/Leuze.App/Leuze.App.csproj
index d905b63..d3d61e2 100644
--- a/src/Presentation/Leuze.App/Leuze.App.csproj
+++ b/src/Presentation/Leuze.App/Leuze.App.csproj
@@ -5,6 +5,7 @@
     <RootNamespace>Leuze.App</RootNamespace>
     <Product></Product>
     <Description></Description>
+    <Configurations>Debug;Release;Test</Configurations>
   </PropertyGroup>
 
   <PropertyGroup>
@@ -18,6 +19,10 @@
     <DocumentationFile>..\..\..\docs\Leuze.App.xml</DocumentationFile>
   </PropertyGroup>
 
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Test|AnyCPU'">
+    <DocumentationFile>..\..\..\docs\Leuze.App.xml</DocumentationFile>
+  </PropertyGroup>
+
   <ItemGroup>
     <Resource Include="wwwroot\Resources\Icons\microsoft-logo.svg">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
diff --git a/tests/Core/Leuze.Tests.Core.Domain/Leuze.Tests.Core.Domain.csproj b/tests/Core/Leuze.Tests.Core.Domain/Leuze.Tests.Core.Domain.csproj
index 7a1dc45..7fdd9a7 100644
--- a/tests/Core/Leuze.Tests.Core.Domain/Leuze.Tests.Core.Domain.csproj
+++ b/tests/Core/Leuze.Tests.Core.Domain/Leuze.Tests.Core.Domain.csproj
@@ -5,6 +5,7 @@
     <RootNamespace>Leuze.Tests.Core.Domain</RootNamespace>
     <Product></Product>
     <Description></Description>
+    <Configurations>Debug;Release;Test</Configurations>
   </PropertyGroup>
 
   <PropertyGroup>
@@ -18,6 +19,10 @@
     <DocumentationFile>..\..\..\docs\Leuze.Tests.Core.Domain.xml</DocumentationFile>
   </PropertyGroup>
 
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Test|AnyCPU'">
+    <DocumentationFile>..\..\..\docs\Leuze.Tests.Core.Domain.xml</DocumentationFile>
+  </PropertyGroup>
+
   <ItemGroup>
     <PackageReference Include="FluentAssertions" Version="5.10.3" />
     <PackageReference Include="JunitXml.TestLogger" Version="2.1.81" />
diff --git a/tests/Core/Leuze.Tests.Core/Leuze.Tests.Core.csproj b/tests/Core/Leuze.Tests.Core/Leuze.Tests.Core.csproj
index b0a89a3..94abf9a 100644
--- a/tests/Core/Leuze.Tests.Core/Leuze.Tests.Core.csproj
+++ b/tests/Core/Leuze.Tests.Core/Leuze.Tests.Core.csproj
@@ -4,6 +4,8 @@
     <TargetFramework>net5.0</TargetFramework>
 
     <IsPackable>false</IsPackable>
+
+    <Configurations>Debug;Release;Test</Configurations>
   </PropertyGroup>
 
   <ItemGroup>
diff --git a/tests/Leuze.Tests.Configuration/Leuze.Tests.Configuration.csproj b/tests/Leuze.Tests.Configuration/Leuze.Tests.Configuration.csproj
index 89579fc..950c938 100644
--- a/tests/Leuze.Tests.Configuration/Leuze.Tests.Configuration.csproj
+++ b/tests/Leuze.Tests.Configuration/Leuze.Tests.Configuration.csproj
@@ -5,6 +5,7 @@
     <RootNamespace>Leuze.Tests.Configuration</RootNamespace>
     <Product></Product>
     <Description></Description>
+    <Configurations>Debug;Release;Test</Configurations>
   </PropertyGroup>
   
   <PropertyGroup>
@@ -17,6 +18,10 @@
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
     <DocumentationFile>..\..\docs\Leuze.Tests.Configuration.xml</DocumentationFile>
   </PropertyGroup>
+  
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Test|AnyCPU'">
+    <DocumentationFile>..\..\docs\Leuze.Tests.Configuration.xml</DocumentationFile>
+  </PropertyGroup>
 
   <ItemGroup>
     <PackageReference Include="AutoMapper" Version="10.1.1" />
diff --git a/tests/Leuze.Tests.Configuration/Utilities.cs b/tests/Leuze.Tests.Configuration/Utilities.cs
index 97b9029..38b4bf4 100644
--- a/tests/Leuze.Tests.Configuration/Utilities.cs
+++ b/tests/Leuze.Tests.Configuration/Utilities.cs
@@ -22,7 +22,12 @@ namespace Leuze.Tests.Configuration
             List<Assembly> loadedAssemblies = new List<Assembly>();
 
             string workingDirectory = Environment.CurrentDirectory;
+#if TEST
+            string projectDirectory = Directory.GetParent(workingDirectory).Parent.Parent.Parent.FullName;
+#else
             string projectDirectory = Directory.GetParent(workingDirectory).Parent.Parent.Parent.Parent.Parent.FullName;
+#endif
+
 
             // Loop through all dll files in directory
             foreach (FileInfo file in new DirectoryInfo(Path.Combine(projectDirectory, "src", "Presentation", "Leuze.Modules", "net5.0")).GetFiles("*.dll"))
