feat: Add newProjectConfigureHttpApiModule for API configuration and localization

feat: Implement SampleAppServiceTests for application service testing

feat: Create newProjectConfigureApplicationTests project for application layer tests

feat: Establish newProjectConfigureDomainTests project for domain layer tests

feat: Introduce Entity Framework Core tests for the newProjectConfigure application

feat: Develop console test application for HTTP API client demonstration

feat: Implement FakeCurrentPrincipalAccessor for testing purposes

chore: Set up test base classes and data seed contributors for consistent testing environment
This commit is contained in:
sayan.kolay committed 2026-08-31 16:18:47 +05:30
1 parent 7909179fca
commit b6f2213ccf
279 files changed
+39466

No files matched your search

@@ -0,0 +1,34 @@
using Shouldly;
using System.Threading.Tasks;
using Volo.Abp.Identity;
using Volo.Abp.Modularity;
using Xunit;
namespace newProjectConfigure.Samples;
/* This is just an example test class.
* Normally, you don't test code of the modules you are using
* (like IIdentityUserAppService here).
* Only test your own application services.
*/
public abstract class SampleAppServiceTests<TStartupModule> : newProjectConfigureApplicationTestBase<TStartupModule>
where TStartupModule : IAbpModule
{
private readonly IIdentityUserAppService _userAppService;
protected SampleAppServiceTests()
{
_userAppService = GetRequiredService<IIdentityUserAppService>();
}
[Fact]
public async Task Initial_Data_Should_Contain_Admin_User()
{
//Act
var result = await _userAppService.GetListAsync(new GetIdentityUsersInput());
//Assert
result.TotalCount.ShouldBeGreaterThan(0);
result.Items.ShouldContain(u => u.UserName == "admin");
}
}
@@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<RootNamespace>newProjectConfigure</RootNamespace>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\newProjectConfigure.Application\newProjectConfigure.Application.csproj" />
<ProjectReference Include="..\newProjectConfigure.Domain.Tests\newProjectConfigure.Domain.Tests.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
</ItemGroup>
</Project>
@@ -0,0 +1,9 @@
using Volo.Abp.Modularity;
namespace newProjectConfigure;
public abstract class newProjectConfigureApplicationTestBase<TStartupModule> : newProjectConfigureTestBase<TStartupModule>
where TStartupModule : IAbpModule
{
}
@@ -0,0 +1,12 @@
using Volo.Abp.Modularity;
namespace newProjectConfigure;
[DependsOn(
typeof(newProjectConfigureApplicationModule),
typeof(newProjectConfigureDomainTestModule)
)]
public class newProjectConfigureApplicationTestModule : AbpModule
{
}