From 5cd7f09029d08ece974756b2f5faace0481142c7 Mon Sep 17 00:00:00 2001
From: IAtsuta <IAtsuta@IATSUTA-NB>
Date: Fri, 3 Nov 2023 09:57:09 +0100
Subject: [PATCH 1/3] fix tests

---
 .github/workflows/build+unit.yml              |  2 ++
 .../Domain/TestBLLContext.cs                  |  4 ++-
 .../Context/ISecurityBLLContext.cs            |  3 +-
 .../SecurityBLLBaseContext`4.cs               |  1 +
 .../DAL/IAsyncDal.cs                          |  2 +-
 .../Mock/MockDAL.cs                           | 33 +++++++++++++++----
 6 files changed, 35 insertions(+), 10 deletions(-)

diff --git a/.github/workflows/build+unit.yml b/.github/workflows/build+unit.yml
index 353922386..002711b07 100644
--- a/.github/workflows/build+unit.yml
+++ b/.github/workflows/build+unit.yml
@@ -48,3 +48,5 @@ jobs:
           dotnet test src/_Configuration/Framework.Configuration.SubscriptionModeling.Tests.Unit --no-build --verbosity normal
           dotnet test src/_DomainDriven/Framework.DomainDriven.ServiceModel.Tests.Unit --no-build --verbosity normal
           dotnet test src/_DomainDriven/Framework.DomainDriven.DBGenerator.Tests.Unit --no-build --verbosity normal
+          dotnet test src/_DomainDriven/Framework.DomainDriven.Tests.Unit --no-build --verbosity normal
+          
diff --git a/src/_DomainDriven/Framework.DomainDriven.BLL.Security.Tests.Unit/SecurityHierarchy/Domain/TestBLLContext.cs b/src/_DomainDriven/Framework.DomainDriven.BLL.Security.Tests.Unit/SecurityHierarchy/Domain/TestBLLContext.cs
index af278d4ee..9f39498ae 100644
--- a/src/_DomainDriven/Framework.DomainDriven.BLL.Security.Tests.Unit/SecurityHierarchy/Domain/TestBLLContext.cs
+++ b/src/_DomainDriven/Framework.DomainDriven.BLL.Security.Tests.Unit/SecurityHierarchy/Domain/TestBLLContext.cs
@@ -102,7 +102,9 @@ public void Flush()
 
     public IServiceProvider ServiceProvider { get; }
 
-    public ISecurityProvider<TDomainObject> GetDisabledSecurityProvider<TDomainObject>() => this.ServiceProvider.GetRequiredService<ISecurityProvider<TDomainObject>>();
+    public ISecurityProvider<TDomainObject> GetDisabledSecurityProvider<TDomainObject>()
+        where TDomainObject : PersistentDomainObjectBase
+        => this.ServiceProvider.GetRequiredService<ISecurityProvider<TDomainObject>>();
 
     public ISecurityOperationResolver SecurityOperationResolver => this.ServiceProvider.GetRequiredService<ISecurityOperationResolver>();
 }
diff --git a/src/_DomainDriven/Framework.DomainDriven.BLL.Security/Context/ISecurityBLLContext.cs b/src/_DomainDriven/Framework.DomainDriven.BLL.Security/Context/ISecurityBLLContext.cs
index 1d9f18464..b2886fc1f 100644
--- a/src/_DomainDriven/Framework.DomainDriven.BLL.Security/Context/ISecurityBLLContext.cs
+++ b/src/_DomainDriven/Framework.DomainDriven.BLL.Security/Context/ISecurityBLLContext.cs
@@ -9,7 +9,8 @@ public interface ISecurityBLLContext<in TPersistentDomainObjectBase, TIdent> :
 
     where TPersistentDomainObjectBase : class, IIdentityObject<TIdent>
 {
-    ISecurityProvider<TDomainObject> GetDisabledSecurityProvider<TDomainObject>();
+    ISecurityProvider<TDomainObject> GetDisabledSecurityProvider<TDomainObject>()
+        where TDomainObject : TPersistentDomainObjectBase;
 
     ISecurityOperationResolver SecurityOperationResolver { get; }
 }
diff --git a/src/_DomainDriven/Framework.DomainDriven.BLL.Security/SecurityBLLBaseContext`4.cs b/src/_DomainDriven/Framework.DomainDriven.BLL.Security/SecurityBLLBaseContext`4.cs
index 9de89dd92..f56dc25ba 100644
--- a/src/_DomainDriven/Framework.DomainDriven.BLL.Security/SecurityBLLBaseContext`4.cs
+++ b/src/_DomainDriven/Framework.DomainDriven.BLL.Security/SecurityBLLBaseContext`4.cs
@@ -31,6 +31,7 @@ protected SecurityBLLBaseContext(
     public virtual IAccessDeniedExceptionService AccessDeniedExceptionService { get; }
 
     public ISecurityProvider<TDomainObject> GetDisabledSecurityProvider<TDomainObject>()
+        where TDomainObject : TPersistentDomainObjectBase
     {
         return this.ServiceProvider.GetRequiredService<ISecurityProvider<TDomainObject>>();
     }
diff --git a/src/_DomainDriven/Framework.DomainDriven.Core/DAL/IAsyncDal.cs b/src/_DomainDriven/Framework.DomainDriven.Core/DAL/IAsyncDal.cs
index 2c3908625..c37ada38a 100644
--- a/src/_DomainDriven/Framework.DomainDriven.Core/DAL/IAsyncDal.cs
+++ b/src/_DomainDriven/Framework.DomainDriven.Core/DAL/IAsyncDal.cs
@@ -19,5 +19,5 @@ public interface IAsyncDal<TDomainObject, in TIdent>
 
     Task RemoveAsync(TDomainObject domainObject, CancellationToken cancellationToken = default);
 
-    Task LockAsync(TDomainObject domain, LockRole lockRole, CancellationToken cancellationToken = default);
+    Task LockAsync(TDomainObject domainObject, LockRole lockRole, CancellationToken cancellationToken = default);
 }
diff --git a/src/_DomainDriven/Framework.DomainDriven.Tests.Unit/Mock/MockDAL.cs b/src/_DomainDriven/Framework.DomainDriven.Tests.Unit/Mock/MockDAL.cs
index d9b0538b7..4f2be2088 100644
--- a/src/_DomainDriven/Framework.DomainDriven.Tests.Unit/Mock/MockDAL.cs
+++ b/src/_DomainDriven/Framework.DomainDriven.Tests.Unit/Mock/MockDAL.cs
@@ -3,6 +3,7 @@
 using Framework.Core;
 using Framework.DomainDriven.DAL.Revisions;
 using Framework.Persistent;
+using NHibernate;
 
 namespace Framework.DomainDriven.UnitTest.Mock;
 
@@ -127,24 +128,42 @@ public TDomain GetById(TIdent id, LockRole lockRole)
         return this._collection.FirstOrDefault(z => EqualityComparer<TIdent>.Default.Equals(z.Id, id));
     }
 
-    public IQueryable<TDomain> GetQueryable() => throw new NotImplementedException();
+    public IQueryable<TDomain> GetQueryable() => this.GetQueryable(LockRole.None);
 
     public TDomain Load(TIdent id)
     {
         return this.GetById(id, LockRole.None);
     }
 
-    public async Task<TDomain> LoadAsync(TIdent id, CancellationToken cancellationToken = default) => throw new NotImplementedException();
+    public async Task<TDomain> LoadAsync(TIdent id, CancellationToken cancellationToken = default)
+    {
+        return this.Load(id);
+    }
 
-    public async Task RefreshAsync(TDomain domainObject, CancellationToken cancellationToken = default) => throw new NotImplementedException();
+    public async Task RefreshAsync(TDomain domainObject, CancellationToken cancellationToken = default)
+    {
+        this.Refresh(domainObject);
+    }
 
-    public async Task SaveAsync(TDomain domainObject, CancellationToken cancellationToken = default) => throw new NotImplementedException();
+    public async Task SaveAsync(TDomain domainObject, CancellationToken cancellationToken = default)
+    {
+        this.Save(domainObject);
+    }
 
-    public async Task InsertAsync(TDomain domainObject, TIdent id, CancellationToken cancellationToken = default) => throw new NotImplementedException();
+    public async Task InsertAsync(TDomain domainObject, TIdent id, CancellationToken cancellationToken = default)
+    {
+        this.Insert(domainObject, id);
+    }
 
-    public async Task RemoveAsync(TDomain domainObject, CancellationToken cancellationToken = default) => throw new NotImplementedException();
+    public async Task RemoveAsync(TDomain domainObject, CancellationToken cancellationToken = default)
+    {
+        this.Remove(domainObject);
+    }
 
-    public async Task LockAsync(TDomain domain, LockRole lockRole, CancellationToken cancellationToken = default) => throw new NotImplementedException();
+    public async Task LockAsync(TDomain domainObject, LockRole lockRole, CancellationToken cancellationToken = default)
+    {
+        this.Lock(domainObject, lockRole);
+    }
 
     public virtual void Save(TDomain domainObject)
     {

From 29da9e9081796ec5851a5c7031513e4b9edfa5ce Mon Sep 17 00:00:00 2001
From: IAtsuta <IAtsuta@IATSUTA-NB>
Date: Fri, 3 Nov 2023 09:57:30 +0100
Subject: [PATCH 2/3] inc ver

---
 src/__SolutionItems/CommonAssemblyInfo.cs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/__SolutionItems/CommonAssemblyInfo.cs b/src/__SolutionItems/CommonAssemblyInfo.cs
index 2b7019398..1bbfcdf36 100644
--- a/src/__SolutionItems/CommonAssemblyInfo.cs
+++ b/src/__SolutionItems/CommonAssemblyInfo.cs
@@ -4,9 +4,9 @@
 [assembly: AssemblyCompany("Luxoft")]
 [assembly: AssemblyCopyright("Copyright © Luxoft 2009-2023")]
 
-[assembly: AssemblyVersion("19.2.0.0")]
-[assembly: AssemblyFileVersion("19.2.0.0")]
-[assembly: AssemblyInformationalVersion("19.2.0.0")]
+[assembly: AssemblyVersion("19.2.1.0")]
+[assembly: AssemblyFileVersion("19.2.1.0")]
+[assembly: AssemblyInformationalVersion("19.2.1.0")]
 
 #if DEBUG
 [assembly: AssemblyConfiguration("Debug")]

From a58747758de049d6a73cf36fbe279fa8bd627d13 Mon Sep 17 00:00:00 2001
From: IAtsuta <IAtsuta@IATSUTA-NB>
Date: Fri, 3 Nov 2023 10:09:43 +0100
Subject: [PATCH 3/3] fix yml

---
 .github/workflows/build+unit.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/build+unit.yml b/.github/workflows/build+unit.yml
index 002711b07..eb67d738e 100644
--- a/.github/workflows/build+unit.yml
+++ b/.github/workflows/build+unit.yml
@@ -48,5 +48,5 @@ jobs:
           dotnet test src/_Configuration/Framework.Configuration.SubscriptionModeling.Tests.Unit --no-build --verbosity normal
           dotnet test src/_DomainDriven/Framework.DomainDriven.ServiceModel.Tests.Unit --no-build --verbosity normal
           dotnet test src/_DomainDriven/Framework.DomainDriven.DBGenerator.Tests.Unit --no-build --verbosity normal
-          dotnet test src/_DomainDriven/Framework.DomainDriven.Tests.Unit --no-build --verbosity normal
+          dotnet test src/_DomainDriven/Framework.DomainDriven.BLL.Security.Tests.Unit --no-build --verbosity normal