Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
57077b5
migrate testsing
iatsuta Apr 27, 2026
5d0615f
upd
iatsuta Apr 27, 2026
3f19045
compile sln
iatsuta Apr 27, 2026
2ef5a8e
upd
iatsuta Apr 28, 2026
b5a3fd7
upd
iatsuta Apr 28, 2026
d4fe5a5
upd
iatsuta Apr 28, 2026
5fabb7e
upd
iatsuta Apr 28, 2026
36f0001
upd
iatsuta Apr 28, 2026
e0acdd9
upd
iatsuta Apr 29, 2026
033507d
up
iatsuta Apr 29, 2026
16f717f
merge
iatsuta May 11, 2026
4ce2a44
fix
iatsuta May 11, 2026
8981cd4
clean
iatsuta May 11, 2026
fadd2e6
add BssTestEnvironment
iatsuta May 11, 2026
9c0731d
upd
iatsuta May 12, 2026
777d7b7
upd
iatsuta May 12, 2026
95f8ab1
upd
iatsuta May 12, 2026
27efd1e
upd
iatsuta May 13, 2026
c8f1f4e
upd
iatsuta May 15, 2026
bd378b9
upd
iatsuta May 15, 2026
89e5e02
upd
iatsuta May 19, 2026
1a1f867
upd
iatsuta May 19, 2026
4653c15
upd
iatsuta May 19, 2026
44a50b1
upd
iatsuta May 20, 2026
b7f758e
upd
iatsuta May 20, 2026
cdfef67
upd
iatsuta May 20, 2026
5bba214
upd
iatsuta May 20, 2026
d705507
upd
iatsuta May 20, 2026
a162722
upd
iatsuta May 20, 2026
9570d34
upd
iatsuta May 20, 2026
c5dfc59
fix GenerateDBTests
iatsuta May 20, 2026
ae19956
clean
iatsuta May 20, 2026
517698b
use CancellationToken
iatsuta May 20, 2026
5513bc5
upd
iatsuta May 21, 2026
3a20493
upd
iatsuta May 21, 2026
a2644bb
fix yml
iatsuta May 21, 2026
b77a0d6
GitHub DEBUG
iatsuta May 21, 2026
c0e2cd7
add debug
iatsuta May 21, 2026
2b6e600
upd
iatsuta May 21, 2026
3d88ee9
upd
iatsuta May 21, 2026
28994d9
upd
iatsuta May 21, 2026
d039d70
upd
iatsuta May 21, 2026
8960e06
upd log
iatsuta May 21, 2026
1adaddc
upd
iatsuta May 21, 2026
480b450
upd
iatsuta May 21, 2026
dd55fe8
upd
iatsuta May 22, 2026
f737fe8
upd
iatsuta May 22, 2026
7d0d832
upd
iatsuta May 22, 2026
2404a5b
upd
iatsuta May 22, 2026
89e2cae
upd
iatsuta May 22, 2026
0600286
upd
iatsuta May 22, 2026
92790b4
upd
iatsuta May 22, 2026
635ad2f
upd
iatsuta May 22, 2026
68b94ce
upd
iatsuta May 22, 2026
4468472
restore
iatsuta May 22, 2026
7f50a7c
Merge branch 'main' into iatsuta/migrate-Testing
iatsuta May 22, 2026
31772b4
clean
iatsuta May 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,4 @@ jobs:

- name: NHibernate Integration Tests
run: |
dotnet test --blame src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate --no-build --verbosity normal;

- name: NHibernate Integration Tests Xunit
run: |
dotnet test --blame src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.Xunit.NHibernate --no-build --verbosity normal;

dotnet test --blame src/_SampleSystem/_Tests/SampleSystem.IntegrationTests.NHibernate --no-build --verbosity normal;
2 changes: 1 addition & 1 deletion src/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ indent_style = space
charset = utf-8-bom
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 180
max_line_length = 160

# Microsoft .NET properties
csharp_preserve_single_line_blocks = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public async Task RemoveAsync(TDomainObject domainObject, CancellationToken canc
await dal.RemoveAsync(domainObject, cancellationToken);
}

private Task CheckAccess(TDomainObject domainObject, CancellationToken cancellationToken) =>
private ValueTask CheckAccess(TDomainObject domainObject, CancellationToken cancellationToken) =>
securityProvider.CheckAccessAsync(domainObject, accessDeniedExceptionService, cancellationToken);

public IQueryable<TDomainObject> GetQueryable() => dal.GetQueryable().Pipe(securityProvider.Inject);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.v3" />
<PackageReference Include="xunit.runner.visualstudio">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
8 changes: 4 additions & 4 deletions src/Application/Framework.Application.Tests/PeriodTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ public void GetFinancialYear_MonthOutOfRange_ThrowArgumentOutOfRangeException(in
var service = new FinancialYearCalculator(new FinancialYearServiceSettings());

// Act
Action action = () => service.GetFinancialYear(2017, month);
var ex = Record.Exception(() => service.GetFinancialYear(2017, month));

// Assert
Assert.Throws<ArgumentOutOfRangeException>(action);
Assert.IsType<ArgumentOutOfRangeException>(ex);
}

/// <summary>
Expand All @@ -61,9 +61,9 @@ public void GetFinancialYear_YearOutOfRange_ThrowArgumentOutOfRangeException(int
var service = new FinancialYearCalculator(new FinancialYearServiceSettings());

// Act
Action action = () => service.GetFinancialYear(year, month);
var ex = Record.Exception(() => service.GetFinancialYear(year, month));

// Assert
Assert.Throws<ArgumentOutOfRangeException>(action);
Assert.IsType<ArgumentOutOfRangeException>(ex);
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<PackageId>Luxoft.Framework.AutomationCore.ServiceEnvironment.LegacyContext</PackageId>
<PackageId>Luxoft.Framework.AutomationCore.Legacy</PackageId>
<RootNamespace>Framework.AutomationCore</RootNamespace>
</PropertyGroup>

Expand All @@ -15,7 +15,7 @@

<ProjectReference Include="..\..\_Authorization\Framework.Authorization.WebApi\Framework.Authorization.WebApi.csproj" />

<ProjectReference Include="..\Framework.AutomationCore.ServiceEnvironment\Framework.AutomationCore.ServiceEnvironment.csproj" />
<ProjectReference Include="..\Framework.AutomationCore\Framework.AutomationCore.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using Framework.Application;
using Framework.Application.Repository;
using Framework.AutomationCore.RootServiceProviderContainer;
using Framework.AutomationCore.ServiceProviderPool;
using Framework.BLL.DTOMapping.Domain;
using Framework.Configuration.BLL;
using Framework.Configuration.Domain;
Expand All @@ -18,23 +17,22 @@

namespace Framework.AutomationCore;

public abstract class IntegrationTestBase<TBLLContext>(IServiceProviderPool rootServiceProviderPool)
: IntegrationTestBase(rootServiceProviderPool), IRootServiceProviderContainer<TBLLContext>
public abstract class IntegrationTestBase<TBLLContext>(IServiceProvider rootServiceProvider) : RootServiceProviderContainer<TBLLContext>(rootServiceProvider)
where TBLLContext : IServiceProviderContainer
{
public Task<TResult> EvaluateAsync<TResult>(
DBSessionMode sessionMode,
UserCredential? customUserCredential,
Func<TBLLContext, Task<TResult>> getResult) =>
this.RootServiceProvider.GetRequiredService<IServiceEvaluator<TBLLContext>>().EvaluateAsync(sessionMode, customUserCredential, getResult);
rootServiceProvider.GetRequiredService<IServiceEvaluator<TBLLContext>>().EvaluateAsync(sessionMode, customUserCredential, getResult);


protected IConfigurationBLLContext GetConfigurationBLLContext(TBLLContext context) => context.ServiceProvider.GetRequiredService<IConfigurationBLLContext>();

/// <summary>
/// Отчистка списка нотифицаций
/// </summary>
public override void ClearNotifications() =>
public virtual void ClearNotifications() =>
this.EvaluateWrite(context => this.GetConfigurationBLLContext(context).Logics.DomainObjectNotification.Pipe(bll => bll.GetFullList().ForEach(bll.Remove)));

/// <summary>
Expand All @@ -46,12 +44,12 @@ protected virtual List<ObjectModificationInfoDTO<Guid>> GetModifications() =>

this.GetConfigurationBLLContext(context).Logics.DomainObjectModification.GetFullList()
.ToList(mod => new ObjectModificationInfoDTO<Guid>
{
Identity = mod.DomainObjectId,
ModificationType = mod.Type,
Revision = mod.Revision,
TypeInfoDescription = new TypeInfoDescriptionDTO { Name = mod.DomainType.Name, Namespace = mod.DomainType.Namespace }
}));
{
Identity = mod.DomainObjectId,
ModificationType = mod.Type,
Revision = mod.Revision,
TypeInfoDescription = new TypeInfoDescriptionDTO { Name = mod.DomainType.Name, Namespace = mod.DomainType.Namespace }
}));

/// <summary>
/// Отчистка списка модификаций
Expand All @@ -62,7 +60,7 @@ protected virtual void ClearModifications() =>
/// <summary>
/// Отчистка интеграционных евентов
/// </summary>
public override void ClearIntegrationEvents()
public virtual void ClearIntegrationEvents()
{
this.ClearModifications();

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
namespace Framework.AutomationCore.RootServiceProviderContainer;

public class RootServiceProviderContainer<TBLLContext>(IServiceProvider rootServiceProvider) : RootServiceProviderContainer(rootServiceProvider), IRootServiceProviderContainer<TBLLContext>;

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading