commit 866bd55c49a95dfcc2e4d1ce24c92059029bde2a
Author: Milan Hotovec <silent@students.zcu.cz>
Date:   Fri May 28 17:33:09 2021 +0200

    Test location and paths fixed
    @testFull

diff --git a/Leuze.Tests.Modules.Goal/GoalDefinitionAreasTests.cs b/Leuze.Tests.Modules.Goal/GoalDefinitionAreasTests.cs
deleted file mode 100644
index 51b2d69..0000000
--- a/Leuze.Tests.Modules.Goal/GoalDefinitionAreasTests.cs
+++ /dev/null
@@ -1,130 +0,0 @@
-//#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);
-
-
-            DatabaseFixture.Storage.Database.EnsureDeleted();
-            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();
-        }
-
-        
-        [Fact]
-        public async void CreateNewAreaTestTL()
-        {
-            await _semaphore.WaitAsync();
-
-            var AuthenticationStateProviderMock = await TestUtils.AuthenticationMock(DatabaseFixture, TestUtils.TLName);
-            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();
-        }
-
-        
-        [Fact]
-        public async void CreateNewAreaTestMA()
-        {
-            await _semaphore.WaitAsync();
-
-            var AuthenticationStateProviderMock = await TestUtils.AuthenticationMock(DatabaseFixture, TestUtils.MAName);
-            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();
-        }
-
-        [Fact]
-        public async void CreateNewAreaTestOverlap()
-        {
-            await _semaphore.WaitAsync();
-
-            var AuthenticationStateProviderMock = await TestUtils.AuthenticationMock(DatabaseFixture, TestUtils.TLName);
-            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();
-
-            result = await handler.Handle(new CreateNewArea.Command(DateTime.Today.AddDays(1), DateTime.Today.AddDays(2), 0.0), default);
-
-            result.IsSuccess.Should().BeFalse();
-
-            _semaphore.Release();
-        }
-
-        [Fact]
-        public async void CreateNewAreaTestWrongRange()
-        {
-            await _semaphore.WaitAsync();
-
-            var AuthenticationStateProviderMock = await TestUtils.AuthenticationMock(DatabaseFixture, TestUtils.MAName);
-            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.AddDays(1), DateTime.Today, 0.0), default);
-
-            result.IsSuccess.Should().BeFalse();
-
-            _semaphore.Release();
-        }
-    }
-}
diff --git a/Leuze.Tests.Modules.Goal/GoalDefinitionsTests.cs b/Leuze.Tests.Modules.Goal/GoalDefinitionsTests.cs
deleted file mode 100644
index 9a0276e..0000000
--- a/Leuze.Tests.Modules.Goal/GoalDefinitionsTests.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-﻿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
deleted file mode 100644
index ffdcb22..0000000
--- a/Leuze.Tests.Modules.Goal/GoalsTests.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-﻿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
deleted file mode 100644
index 3e459d8..0000000
--- a/Leuze.Tests.Modules.Goal/Leuze.Tests.Modules.Goal.csproj
+++ /dev/null
@@ -1,32 +0,0 @@
-﻿<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
deleted file mode 100644
index 84fd2c3..0000000
--- a/Leuze.Tests.Modules.Goal/TestUtils.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-﻿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 438b0c2..4e705f8 100644
--- a/Leuze.sln
+++ b/Leuze.sln
@@ -55,70 +55,99 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Leuze.Modules.Goal.Infrastr
 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}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Leuze.Tests.Modules.Goal", "tests\Goals\Leuze.Tests.Modules.Goal\Leuze.Tests.Modules.Goal.csproj", "{885D5C4E-2C97-4F8B-97BF-16D2A28BDE4D}"
 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 = Test|Any CPU
+		{66EEF1C2-9476-4FF6-86F7-2C1035C7DC66}.Test|Any CPU.Build.0 = Test|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 = Test|Any CPU
+		{674168B3-2D4C-4746-A1A7-FE890BD59C1A}.Test|Any CPU.Build.0 = Test|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
-		{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
+		{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
+		{885D5C4E-2C97-4F8B-97BF-16D2A28BDE4D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{885D5C4E-2C97-4F8B-97BF-16D2A28BDE4D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{885D5C4E-2C97-4F8B-97BF-16D2A28BDE4D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{885D5C4E-2C97-4F8B-97BF-16D2A28BDE4D}.Release|Any CPU.Build.0 = Release|Any CPU
+		{885D5C4E-2C97-4F8B-97BF-16D2A28BDE4D}.Test|Any CPU.ActiveCfg = Test|Any CPU
+		{885D5C4E-2C97-4F8B-97BF-16D2A28BDE4D}.Test|Any CPU.Build.0 = Test|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
@@ -146,7 +175,7 @@ Global
 		{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}
+		{885D5C4E-2C97-4F8B-97BF-16D2A28BDE4D} = {B89031F6-163B-417B-B90E-2DC90A30E7A1}
 	EndGlobalSection
 	GlobalSection(ExtensibilityGlobals) = postSolution
 		SolutionGuid = {849C3668-1CB9-4F98-ADFA-A71F5629384C}
diff --git a/src/Core/Application/Leuze.Core.Application.UI/Properties/launchSettings.json b/src/Core/Application/Leuze.Core.Application.UI/Properties/launchSettings.json
index 22593d0..70eb9ef 100644
--- a/src/Core/Application/Leuze.Core.Application.UI/Properties/launchSettings.json
+++ b/src/Core/Application/Leuze.Core.Application.UI/Properties/launchSettings.json
@@ -3,8 +3,8 @@
     "windowsAuthentication": false,
     "anonymousAuthentication": true,
     "iisExpress": {
-      "applicationUrl": "http://localhost:57867/",
-      "sslPort": 44379
+      "applicationUrl": "http://localhost:54304/",
+      "sslPort": 44336
     }
   },
   "profiles": {
diff --git a/tests/Goals/Leuze.Tests.Modules.Goal/GoalDefinitionAreasTests.cs b/tests/Goals/Leuze.Tests.Modules.Goal/GoalDefinitionAreasTests.cs
new file mode 100644
index 0000000..51b2d69
--- /dev/null
+++ b/tests/Goals/Leuze.Tests.Modules.Goal/GoalDefinitionAreasTests.cs
@@ -0,0 +1,130 @@
+//#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);
+
+
+            DatabaseFixture.Storage.Database.EnsureDeleted();
+            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();
+        }
+
+        
+        [Fact]
+        public async void CreateNewAreaTestTL()
+        {
+            await _semaphore.WaitAsync();
+
+            var AuthenticationStateProviderMock = await TestUtils.AuthenticationMock(DatabaseFixture, TestUtils.TLName);
+            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();
+        }
+
+        
+        [Fact]
+        public async void CreateNewAreaTestMA()
+        {
+            await _semaphore.WaitAsync();
+
+            var AuthenticationStateProviderMock = await TestUtils.AuthenticationMock(DatabaseFixture, TestUtils.MAName);
+            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();
+        }
+
+        [Fact]
+        public async void CreateNewAreaTestOverlap()
+        {
+            await _semaphore.WaitAsync();
+
+            var AuthenticationStateProviderMock = await TestUtils.AuthenticationMock(DatabaseFixture, TestUtils.TLName);
+            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();
+
+            result = await handler.Handle(new CreateNewArea.Command(DateTime.Today.AddDays(1), DateTime.Today.AddDays(2), 0.0), default);
+
+            result.IsSuccess.Should().BeFalse();
+
+            _semaphore.Release();
+        }
+
+        [Fact]
+        public async void CreateNewAreaTestWrongRange()
+        {
+            await _semaphore.WaitAsync();
+
+            var AuthenticationStateProviderMock = await TestUtils.AuthenticationMock(DatabaseFixture, TestUtils.MAName);
+            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.AddDays(1), DateTime.Today, 0.0), default);
+
+            result.IsSuccess.Should().BeFalse();
+
+            _semaphore.Release();
+        }
+    }
+}
diff --git a/tests/Goals/Leuze.Tests.Modules.Goal/GoalDefinitionsTests.cs b/tests/Goals/Leuze.Tests.Modules.Goal/GoalDefinitionsTests.cs
new file mode 100644
index 0000000..9a0276e
--- /dev/null
+++ b/tests/Goals/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/tests/Goals/Leuze.Tests.Modules.Goal/GoalsTests.cs b/tests/Goals/Leuze.Tests.Modules.Goal/GoalsTests.cs
new file mode 100644
index 0000000..ffdcb22
--- /dev/null
+++ b/tests/Goals/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/tests/Goals/Leuze.Tests.Modules.Goal/Leuze.Tests.Modules.Goal.csproj b/tests/Goals/Leuze.Tests.Modules.Goal/Leuze.Tests.Modules.Goal.csproj
new file mode 100644
index 0000000..0f3a9ea
--- /dev/null
+++ b/tests/Goals/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="..\..\Leuze.Tests.Configuration\Leuze.Tests.Configuration.csproj" />
+  </ItemGroup>
+
+</Project>
diff --git a/tests/Goals/Leuze.Tests.Modules.Goal/TestUtils.cs b/tests/Goals/Leuze.Tests.Modules.Goal/TestUtils.cs
new file mode 100644
index 0000000..84fd2c3
--- /dev/null
+++ b/tests/Goals/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;
+        }
+    }
+}
