Browse Source
Merge pull request #267 from EasyAbp/abp-7.3
Upgrade to ABP 7.3.0
pull/268/head
Super
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
91 changed files with
472 additions and
171 deletions
-
Directory.Build.props
-
integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp.EShop.Domain.Shared.csproj
-
integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/EShopDomainSharedModule.cs
-
integration/EasyAbp.EShop/test/EasyAbp.EShop.Application.Tests/EasyAbp.EShop.Application.Tests.csproj
-
integration/EasyAbp.EShop/test/EasyAbp.EShop.Domain.Tests/EasyAbp.EShop.Domain.Tests.csproj
-
integration/EasyAbp.EShop/test/EasyAbp.EShop.EntityFrameworkCore.Tests/EasyAbp.EShop.EntityFrameworkCore.Tests.csproj
-
integration/EasyAbp.EShop/test/EasyAbp.EShop.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.HttpApi.Client.ConsoleTestApp.csproj
-
integration/EasyAbp.EShop/test/EasyAbp.EShop.MongoDB.Tests/EasyAbp.EShop.MongoDB.Tests.csproj
-
integration/EasyAbp.EShop/test/EasyAbp.EShop.MongoDB.Tests/MongoDB/EShopMongoDbTestModule.cs
-
integration/EasyAbp.EShop/test/EasyAbp.EShop.MongoDB.Tests/MongoDB/MongoDbFixture.cs
-
integration/EasyAbp.EShop/test/EasyAbp.EShop.TestBase/EasyAbp.EShop.TestBase.csproj
-
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp.EShop.Orders.Domain.Shared.csproj
-
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/EShopOrdersDomainSharedModule.cs
-
modules/EasyAbp.EShop.Orders/test/EasyAbp.EShop.Orders.MongoDB.Tests/EasyAbp.EShop.Orders.MongoDB.Tests.csproj
-
modules/EasyAbp.EShop.Orders/test/EasyAbp.EShop.Orders.MongoDB.Tests/MongoDB/EShopOrdersMongoDbTestModule.cs
-
modules/EasyAbp.EShop.Orders/test/EasyAbp.EShop.Orders.MongoDB.Tests/MongoDB/MongoDbFixture.cs
-
modules/EasyAbp.EShop.Orders/test/EasyAbp.EShop.Orders.MongoDB.Tests/MongoDB/MongoTestCollection.cs
-
modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp.EShop.Payments.Domain.Shared.csproj
-
modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/EShopPaymentsDomainSharedModule.cs
-
modules/EasyAbp.EShop.Payments/test/EasyAbp.EShop.Payments.MongoDB.Tests/EasyAbp.EShop.Payments.MongoDB.Tests.csproj
-
modules/EasyAbp.EShop.Payments/test/EasyAbp.EShop.Payments.MongoDB.Tests/MongoDB/EShopPaymentsMongoDbTestModule.cs
-
modules/EasyAbp.EShop.Payments/test/EasyAbp.EShop.Payments.MongoDB.Tests/MongoDB/MongoDbFixture.cs
-
modules/EasyAbp.EShop.Payments/test/EasyAbp.EShop.Payments.MongoDB.Tests/MongoDB/MongoTestCollection.cs
-
modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp.EShop.Plugins.Domain.Shared.csproj
-
modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp/EShop/Plugins/EShopPluginsDomainSharedModule.cs
-
modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.Application.Tests/EasyAbp.EShop.Plugins.Application.Tests.csproj
-
modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.Domain.Tests/EasyAbp.EShop.Plugins.Domain.Tests.csproj
-
modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.EntityFrameworkCore.Tests/EasyAbp.EShop.Plugins.EntityFrameworkCore.Tests.csproj
-
modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Plugins.HttpApi.Client.ConsoleTestApp.csproj
-
modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.MongoDB.Tests/EasyAbp.EShop.Plugins.MongoDB.Tests.csproj
-
modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.MongoDB.Tests/MongoDB/EShopPluginsMongoDbTestModule.cs
-
modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.MongoDB.Tests/MongoDB/MongoDbFixture.cs
-
modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.MongoDB.Tests/MongoDB/MongoTestCollection.cs
-
modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.TestBase/EasyAbp.EShop.Plugins.TestBase.csproj
-
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp.EShop.Products.Domain.Shared.csproj
-
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/EShopProductsDomainSharedModule.cs
-
modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.MongoDB.Tests/EasyAbp.EShop.Products.MongoDB.Tests.csproj
-
modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.MongoDB.Tests/MongoDB/EShopProductsMongoDbTestModule.cs
-
modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.MongoDB.Tests/MongoDB/MongoDbFixture.cs
-
modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.MongoDB.Tests/MongoDB/MongoTestCollection.cs
-
modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp.EShop.Stores.Domain.Shared.csproj
-
modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/EShopStoresDomainSharedModule.cs
-
modules/EasyAbp.EShop.Stores/test/EasyAbp.EShop.Stores.MongoDB.Tests/EasyAbp.EShop.Stores.MongoDB.Tests.csproj
-
modules/EasyAbp.EShop.Stores/test/EasyAbp.EShop.Stores.MongoDB.Tests/MongoDB/EShopStoresMongoDbTestModule.cs
-
modules/EasyAbp.EShop.Stores/test/EasyAbp.EShop.Stores.MongoDB.Tests/MongoDB/MongoDbFixture.cs
-
modules/EasyAbp.EShop.Stores/test/EasyAbp.EShop.Stores.MongoDB.Tests/MongoDB/MongoTestCollection.cs
-
plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp.EShop.Plugins.Baskets.Domain.Shared.csproj
-
plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/EShopPluginsBasketsDomainSharedModule.cs
-
plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.Application.Tests/EasyAbp.EShop.Plugins.Baskets.Application.Tests.csproj
-
plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.Domain.Tests/EasyAbp.EShop.Plugins.Baskets.Domain.Tests.csproj
-
plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore.Tests/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore.Tests.csproj
-
plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client.ConsoleTestApp.csproj
-
plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.MongoDB.Tests/EasyAbp.EShop.Plugins.Baskets.MongoDB.Tests.csproj
-
plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.MongoDB.Tests/MongoDB/BasketsMongoDbTestModule.cs
-
plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.MongoDB.Tests/MongoDB/MongoDbFixture.cs
-
plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.TestBase/EasyAbp.EShop.Plugins.Baskets.TestBase.csproj
-
plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/EasyAbp.EShop.Plugins.Booking.Domain.Shared.csproj
-
plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/EasyAbp/EShop/Plugins/Booking/EShopPluginsBookingDomainSharedModule.cs
-
plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.MongoDB.Tests/EasyAbp.EShop.Plugins.Booking.MongoDB.Tests.csproj
-
plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.MongoDB.Tests/MongoDB/BookingMongoDbTestModule.cs
-
plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.MongoDB.Tests/MongoDB/MongoDbFixture.cs
-
plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp.EShop.Plugins.Coupons.Domain.Shared.csproj
-
plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/EShopPluginsCouponsDomainSharedModule.cs
-
plugins/Coupons/test/EasyAbp.EShop.Plugins.Coupons.MongoDB.Tests/EasyAbp.EShop.Plugins.Coupons.MongoDB.Tests.csproj
-
plugins/Coupons/test/EasyAbp.EShop.Plugins.Coupons.MongoDB.Tests/MongoDB/CouponsMongoDbTestModule.cs
-
plugins/Coupons/test/EasyAbp.EShop.Plugins.Coupons.MongoDB.Tests/MongoDB/MongoDbFixture.cs
-
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared.csproj
-
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/EShopPluginsFlashSalesDomainSharedModule.cs
-
plugins/FlashSales/test/EasyAbp.EShop.Plugins.FlashSales.MongoDB.Tests/EasyAbp.EShop.Plugins.FlashSales.MongoDB.Tests.csproj
-
plugins/FlashSales/test/EasyAbp.EShop.Plugins.FlashSales.MongoDB.Tests/EasyAbp/EShop/Plugins/FlashSales/MongoDB/EShopPluginsFlashSalesMongoDbTestModule.cs
-
plugins/FlashSales/test/EasyAbp.EShop.Plugins.FlashSales.MongoDB.Tests/EasyAbp/EShop/Plugins/FlashSales/MongoDB/MongoDbFixture.cs
-
plugins/Inventories/DaprActors/test/EasyAbp.EShop.Products.DaprActorsInventory.Domain.Tests/DaprActorsProductInventoryProviderTests.cs
-
plugins/Inventories/DaprActors/test/EasyAbp.EShop.Products.DaprActorsInventory.Domain.Tests/EShopProductsDaprActorsInventoryDomainTestModule.cs
-
plugins/Inventories/DaprActors/test/EasyAbp.EShop.Products.DaprActorsInventory.Domain.Tests/EasyAbp.EShop.Products.DaprActorsInventory.Domain.Tests.csproj
-
plugins/Inventories/DaprActors/test/EasyAbp.EShop.Products.DaprActorsInventory.Domain.Tests/FakeInventoryActor.cs
-
plugins/Inventories/DaprActors/test/EasyAbp.EShop.Products.DaprActorsInventory.Domain.Tests/ProductsDaprActorsInventoryTestBase.cs
-
plugins/Inventories/DaprActors/test/EasyAbp.EShop.Products.DaprActorsInventory.Domain.Tests/TestActorProxyFactory.cs
-
plugins/Inventories/OrleansGrains/test/EasyAbp.EShop.Products.OrleansGrainsInventory.Domain.Tests/EShopProductsOrleansGrainsInventoryDomainTestModule.cs
-
plugins/Inventories/OrleansGrains/test/EasyAbp.EShop.Products.OrleansGrainsInventory.Domain.Tests/EasyAbp.EShop.Products.OrleansGrainsInventory.Domain.Tests.csproj
-
plugins/Inventories/OrleansGrains/test/EasyAbp.EShop.Products.OrleansGrainsInventory.Domain.Tests/FakeInventoryGrain.cs
-
plugins/Inventories/OrleansGrains/test/EasyAbp.EShop.Products.OrleansGrainsInventory.Domain.Tests/OrleansGrainsProductInventoryProviderTests.cs
-
plugins/Inventories/OrleansGrains/test/EasyAbp.EShop.Products.OrleansGrainsInventory.Domain.Tests/ProductsOrleansGrainsInventoryTestBase.cs
-
plugins/Inventories/OrleansGrains/test/EasyAbp.EShop.Products.OrleansGrainsInventory.Domain.Tests/TestGrainFactory.cs
-
plugins/Promotions/src/EasyAbp.EShop.Plugins.Promotions.Domain.Shared/EasyAbp.EShop.Plugins.Promotions.Domain.Shared.csproj
-
plugins/Promotions/src/EasyAbp.EShop.Plugins.Promotions.Domain.Shared/EasyAbp/EShop/Plugins/Promotions/EShopPluginsPromotionsDomainSharedModule.cs
-
plugins/Promotions/test/EasyAbp.EShop.Plugins.Promotions.MongoDB.Tests/EasyAbp.EShop.Plugins.Promotions.MongoDB.Tests.csproj
-
plugins/Promotions/test/EasyAbp.EShop.Plugins.Promotions.MongoDB.Tests/MongoDB/MongoDbFixture.cs
-
plugins/Promotions/test/EasyAbp.EShop.Plugins.Promotions.MongoDB.Tests/MongoDB/PromotionsMongoDbTestModule.cs
-
samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSample.Web.csproj
-
samples/EShopSample/aspnet-core/src/EShopSample.Web/package.json
-
samples/EShopSample/aspnet-core/src/EShopSample.Web/yarn.lock
|
|
|
@ -1,13 +1,13 @@ |
|
|
|
<Project> |
|
|
|
<PropertyGroup> |
|
|
|
|
|
|
|
<AbpVersion>7.2.1</AbpVersion> |
|
|
|
<EasyAbpAbpTreesModuleVersion>2.11.0</EasyAbpAbpTreesModuleVersion> |
|
|
|
<EasyAbpPaymentServiceModuleVersion>2.6.0</EasyAbpPaymentServiceModuleVersion> |
|
|
|
<EasyAbpAbpTagHelperPlusModuleVersion>1.5.0</EasyAbpAbpTagHelperPlusModuleVersion> |
|
|
|
<EasyAbpBookingServiceModuleVersion>0.6.0</EasyAbpBookingServiceModuleVersion> |
|
|
|
<DaprSdkVersion>1.9.0</DaprSdkVersion> |
|
|
|
<OrleansVersion>3.6.5</OrleansVersion> |
|
|
|
<AbpVersion>7.3.0</AbpVersion> |
|
|
|
<EasyAbpAbpTreesModuleVersion>2.12.0</EasyAbpAbpTreesModuleVersion> |
|
|
|
<EasyAbpPaymentServiceModuleVersion>2.7.0</EasyAbpPaymentServiceModuleVersion> |
|
|
|
<EasyAbpAbpTagHelperPlusModuleVersion>1.6.0</EasyAbpAbpTagHelperPlusModuleVersion> |
|
|
|
<EasyAbpBookingServiceModuleVersion>0.7.0</EasyAbpBookingServiceModuleVersion> |
|
|
|
<DaprSdkVersion>1.11.0</DaprSdkVersion> |
|
|
|
<OrleansVersion>3.7.1</OrleansVersion> |
|
|
|
<NodaMoneyVersion>1.0.5</NodaMoneyVersion> |
|
|
|
|
|
|
|
</PropertyGroup> |
|
|
|
|
|
|
|
@ -9,6 +9,7 @@ |
|
|
|
</PropertyGroup> |
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
<PackageReference Include="Volo.Abp.Ddd.Domain.Shared" Version="$(AbpVersion)" /> |
|
|
|
<PackageReference Include="Volo.Abp.Validation" Version="$(AbpVersion)" /> |
|
|
|
<ProjectReference Include="..\..\..\..\modules\EasyAbp.EShop.Orders\src\EasyAbp.EShop.Orders.Domain.Shared\EasyAbp.EShop.Orders.Domain.Shared.csproj" /> |
|
|
|
<ProjectReference Include="..\..\..\..\modules\EasyAbp.EShop.Payments\src\EasyAbp.EShop.Payments.Domain.Shared\EasyAbp.EShop.Payments.Domain.Shared.csproj" /> |
|
|
|
|
|
|
|
@ -1,4 +1,5 @@ |
|
|
|
using EasyAbp.EShop.Plugins; |
|
|
|
using Volo.Abp.Domain; |
|
|
|
using Volo.Abp.Modularity; |
|
|
|
using Volo.Abp.Localization; |
|
|
|
using EasyAbp.EShop.Localization; |
|
|
|
@ -15,6 +16,7 @@ namespace EasyAbp.EShop |
|
|
|
{ |
|
|
|
[DependsOn( |
|
|
|
typeof(AbpValidationModule), |
|
|
|
typeof(AbpDddDomainSharedModule), |
|
|
|
typeof(EShopOrdersDomainSharedModule), |
|
|
|
typeof(EShopPaymentsDomainSharedModule), |
|
|
|
typeof(EShopPluginsDomainSharedModule), |
|
|
|
|
|
|
|
@ -2,7 +2,7 @@ |
|
|
|
|
|
|
|
<PropertyGroup> |
|
|
|
<TargetFramework>net7.0</TargetFramework> |
|
|
|
<RootNamespace /> |
|
|
|
<RootNamespace>EasyAbp.EShop</RootNamespace> |
|
|
|
</PropertyGroup> |
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
|
|
|
|
@ -2,7 +2,7 @@ |
|
|
|
|
|
|
|
<PropertyGroup> |
|
|
|
<TargetFramework>net7.0</TargetFramework> |
|
|
|
<RootNamespace /> |
|
|
|
<RootNamespace>EasyAbp.EShop</RootNamespace> |
|
|
|
</PropertyGroup> |
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
|
|
|
|
@ -2,7 +2,7 @@ |
|
|
|
|
|
|
|
<PropertyGroup> |
|
|
|
<TargetFramework>net7.0</TargetFramework> |
|
|
|
<RootNamespace /> |
|
|
|
<RootNamespace>EasyAbp.EShop</RootNamespace> |
|
|
|
</PropertyGroup> |
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
|
|
|
|
@ -3,7 +3,7 @@ |
|
|
|
<PropertyGroup> |
|
|
|
<OutputType>Exe</OutputType> |
|
|
|
<TargetFramework>net7.0</TargetFramework> |
|
|
|
<RootNamespace /> |
|
|
|
<RootNamespace>EasyAbp.EShop</RootNamespace> |
|
|
|
</PropertyGroup> |
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
|
|
|
|
@ -2,12 +2,15 @@ |
|
|
|
|
|
|
|
<PropertyGroup> |
|
|
|
<TargetFramework>net7.0</TargetFramework> |
|
|
|
<RootNamespace /> |
|
|
|
<RootNamespace>EasyAbp.EShop</RootNamespace> |
|
|
|
</PropertyGroup> |
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" /> |
|
|
|
<PackageReference Include="Mongo2Go" Version="3.1.3" /> |
|
|
|
<PackageReference Include="EphemeralMongo.Core" Version="1.1.0" /> |
|
|
|
<PackageReference Include="EphemeralMongo6.runtime.linux-x64" Version="1.1.0" Condition="$([MSBuild]::IsOSPlatform('Linux'))" /> |
|
|
|
<PackageReference Include="EphemeralMongo6.runtime.osx-x64" Version="1.1.0" Condition="$([MSBuild]::IsOSPlatform('OSX'))" /> |
|
|
|
<PackageReference Include="EphemeralMongo6.runtime.win-x64" Version="1.1.0" Condition="$([MSBuild]::IsOSPlatform('Windows'))" /> |
|
|
|
<ProjectReference Include="..\..\src\EasyAbp.EShop.MongoDB\EasyAbp.EShop.MongoDB.csproj" /> |
|
|
|
<ProjectReference Include="..\EasyAbp.EShop.TestBase\EasyAbp.EShop.TestBase.csproj" /> |
|
|
|
</ItemGroup> |
|
|
|
|
|
|
|
@ -12,13 +12,9 @@ namespace EasyAbp.EShop.MongoDB |
|
|
|
{ |
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context) |
|
|
|
{ |
|
|
|
var connectionString = MongoDbFixture.ConnectionString.EnsureEndsWith('/') + |
|
|
|
"Db_" + |
|
|
|
Guid.NewGuid().ToString("N"); |
|
|
|
|
|
|
|
Configure<AbpDbConnectionOptions>(options => |
|
|
|
{ |
|
|
|
options.ConnectionStrings.Default = connectionString; |
|
|
|
options.ConnectionStrings.Default = MongoDbFixture.GetRandomConnectionString(); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -1,12 +1,31 @@ |
|
|
|
using System; |
|
|
|
using Mongo2Go; |
|
|
|
using EphemeralMongo; |
|
|
|
|
|
|
|
namespace EasyAbp.EShop.MongoDB |
|
|
|
{ |
|
|
|
public class MongoDbFixture : IDisposable |
|
|
|
{ |
|
|
|
private static readonly MongoDbRunner MongoDbRunner = MongoDbRunner.Start(); |
|
|
|
public static readonly string ConnectionString = MongoDbRunner.ConnectionString; |
|
|
|
public readonly static IMongoRunner MongoDbRunner; |
|
|
|
|
|
|
|
static MongoDbFixture() |
|
|
|
{ |
|
|
|
MongoDbRunner = MongoRunner.Run(new MongoRunnerOptions |
|
|
|
{ |
|
|
|
UseSingleNodeReplicaSet = true |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
public static string GetRandomConnectionString() |
|
|
|
{ |
|
|
|
return GetConnectionString("Db_" + Guid.NewGuid().ToString("N")); |
|
|
|
} |
|
|
|
|
|
|
|
public static string GetConnectionString(string databaseName) |
|
|
|
{ |
|
|
|
var stringArray = MongoDbRunner.ConnectionString.Split('?'); |
|
|
|
var connectionString = stringArray[0].EnsureEndsWith('/') + databaseName + "/?" + stringArray[1]; |
|
|
|
return connectionString; |
|
|
|
} |
|
|
|
|
|
|
|
public void Dispose() |
|
|
|
{ |
|
|
|
|
|
|
|
@ -2,7 +2,7 @@ |
|
|
|
|
|
|
|
<PropertyGroup> |
|
|
|
<TargetFramework>net7.0</TargetFramework> |
|
|
|
<RootNamespace /> |
|
|
|
<RootNamespace>EasyAbp.EShop</RootNamespace> |
|
|
|
</PropertyGroup> |
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
|
|
|
|
@ -9,6 +9,7 @@ |
|
|
|
</PropertyGroup> |
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
<PackageReference Include="Volo.Abp.Ddd.Domain.Shared" Version="$(AbpVersion)" /> |
|
|
|
<PackageReference Include="Volo.Abp.Validation" Version="$(AbpVersion)" /> |
|
|
|
<PackageReference Include="Volo.Abp.Auditing.Contracts" Version="$(AbpVersion)" /> |
|
|
|
<ProjectReference Include="..\..\..\EasyAbp.EShop.Payments\src\EasyAbp.EShop.Payments.Domain.Shared\EasyAbp.EShop.Payments.Domain.Shared.csproj" /> |
|
|
|
|
|
|
|
@ -1,4 +1,5 @@ |
|
|
|
using Volo.Abp.Modularity; |
|
|
|
using Volo.Abp.Domain; |
|
|
|
using Volo.Abp.Modularity; |
|
|
|
using Volo.Abp.Localization; |
|
|
|
using EasyAbp.EShop.Orders.Localization; |
|
|
|
using EasyAbp.EShop.Payments; |
|
|
|
@ -14,6 +15,7 @@ namespace EasyAbp.EShop.Orders |
|
|
|
{ |
|
|
|
[DependsOn( |
|
|
|
typeof(AbpValidationModule), |
|
|
|
typeof(AbpDddDomainSharedModule), |
|
|
|
typeof(AbpAuditingContractsModule), |
|
|
|
typeof(EShopStoresDomainSharedModule), |
|
|
|
typeof(EShopPaymentsDomainSharedModule), |
|
|
|
|
|
|
|
@ -7,7 +7,10 @@ |
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" /> |
|
|
|
<PackageReference Include="Mongo2Go" Version="3.1.3" /> |
|
|
|
<PackageReference Include="EphemeralMongo.Core" Version="1.1.0" /> |
|
|
|
<PackageReference Include="EphemeralMongo6.runtime.linux-x64" Version="1.1.0" Condition="$([MSBuild]::IsOSPlatform('Linux'))" /> |
|
|
|
<PackageReference Include="EphemeralMongo6.runtime.osx-x64" Version="1.1.0" Condition="$([MSBuild]::IsOSPlatform('OSX'))" /> |
|
|
|
<PackageReference Include="EphemeralMongo6.runtime.win-x64" Version="1.1.0" Condition="$([MSBuild]::IsOSPlatform('Windows'))" /> |
|
|
|
<ProjectReference Include="..\..\src\EasyAbp.EShop.Orders.MongoDB\EasyAbp.EShop.Orders.MongoDB.csproj" /> |
|
|
|
<ProjectReference Include="..\EasyAbp.EShop.Orders.TestBase\EasyAbp.EShop.Orders.TestBase.csproj" /> |
|
|
|
</ItemGroup> |
|
|
|
|
|
|
|
@ -1,5 +1,4 @@ |
|
|
|
using System; |
|
|
|
using Mongo2Go; |
|
|
|
using Volo.Abp; |
|
|
|
using Volo.Abp.Data; |
|
|
|
using Volo.Abp.Modularity; |
|
|
|
@ -12,17 +11,11 @@ namespace EasyAbp.EShop.Orders.MongoDB |
|
|
|
)] |
|
|
|
public class EShopOrdersMongoDbTestModule : AbpModule |
|
|
|
{ |
|
|
|
private static readonly MongoDbRunner MongoDbRunner = MongoDbRunner.Start(); |
|
|
|
|
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context) |
|
|
|
{ |
|
|
|
var connectionString = MongoDbRunner.ConnectionString.EnsureEndsWith('/') + |
|
|
|
"Db_" + |
|
|
|
Guid.NewGuid().ToString("N"); |
|
|
|
|
|
|
|
Configure<AbpDbConnectionOptions>(options => |
|
|
|
{ |
|
|
|
options.ConnectionStrings.Default = connectionString; |
|
|
|
options.ConnectionStrings.Default = MongoDbFixture.GetRandomConnectionString(); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -0,0 +1,34 @@ |
|
|
|
using System; |
|
|
|
using EphemeralMongo; |
|
|
|
|
|
|
|
namespace EasyAbp.EShop.Orders.MongoDB; |
|
|
|
|
|
|
|
public class MongoDbFixture : IDisposable |
|
|
|
{ |
|
|
|
public readonly static IMongoRunner MongoDbRunner; |
|
|
|
|
|
|
|
static MongoDbFixture() |
|
|
|
{ |
|
|
|
MongoDbRunner = MongoRunner.Run(new MongoRunnerOptions |
|
|
|
{ |
|
|
|
UseSingleNodeReplicaSet = true |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
public static string GetRandomConnectionString() |
|
|
|
{ |
|
|
|
return GetConnectionString("Db_" + Guid.NewGuid().ToString("N")); |
|
|
|
} |
|
|
|
|
|
|
|
public static string GetConnectionString(string databaseName) |
|
|
|
{ |
|
|
|
var stringArray = MongoDbRunner.ConnectionString.Split('?'); |
|
|
|
var connectionString = stringArray[0].EnsureEndsWith('/') + databaseName + "/?" + stringArray[1]; |
|
|
|
return connectionString; |
|
|
|
} |
|
|
|
|
|
|
|
public void Dispose() |
|
|
|
{ |
|
|
|
MongoDbRunner?.Dispose(); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -0,0 +1,9 @@ |
|
|
|
using Xunit; |
|
|
|
|
|
|
|
namespace EasyAbp.EShop.Orders.MongoDB; |
|
|
|
|
|
|
|
[CollectionDefinition(Name)] |
|
|
|
public class MongoTestCollection : ICollectionFixture<MongoDbFixture> |
|
|
|
{ |
|
|
|
public const string Name = "MongoDB Collection"; |
|
|
|
} |
|
|
|
@ -9,6 +9,7 @@ |
|
|
|
</PropertyGroup> |
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
<PackageReference Include="Volo.Abp.Ddd.Domain.Shared" Version="$(AbpVersion)" /> |
|
|
|
<PackageReference Include="Volo.Abp.Validation" Version="$(AbpVersion)" /> |
|
|
|
<PackageReference Include="EasyAbp.PaymentService.Domain.Shared" Version="$(EasyAbpPaymentServiceModuleVersion)" /> |
|
|
|
</ItemGroup> |
|
|
|
|
|
|
|
@ -1,4 +1,5 @@ |
|
|
|
using Volo.Abp.Modularity; |
|
|
|
using Volo.Abp.Domain; |
|
|
|
using Volo.Abp.Modularity; |
|
|
|
using Volo.Abp.Localization; |
|
|
|
using EasyAbp.EShop.Payments.Localization; |
|
|
|
using EasyAbp.PaymentService; |
|
|
|
@ -12,6 +13,7 @@ namespace EasyAbp.EShop.Payments |
|
|
|
{ |
|
|
|
[DependsOn( |
|
|
|
typeof(AbpValidationModule), |
|
|
|
typeof(AbpDddDomainSharedModule), |
|
|
|
typeof(PaymentServiceDomainSharedModule) |
|
|
|
)] |
|
|
|
public class EShopPaymentsDomainSharedModule : AbpModule |
|
|
|
|
|
|
|
@ -7,7 +7,10 @@ |
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" /> |
|
|
|
<PackageReference Include="Mongo2Go" Version="3.1.3" /> |
|
|
|
<PackageReference Include="EphemeralMongo.Core" Version="1.1.0" /> |
|
|
|
<PackageReference Include="EphemeralMongo6.runtime.linux-x64" Version="1.1.0" Condition="$([MSBuild]::IsOSPlatform('Linux'))" /> |
|
|
|
<PackageReference Include="EphemeralMongo6.runtime.osx-x64" Version="1.1.0" Condition="$([MSBuild]::IsOSPlatform('OSX'))" /> |
|
|
|
<PackageReference Include="EphemeralMongo6.runtime.win-x64" Version="1.1.0" Condition="$([MSBuild]::IsOSPlatform('Windows'))" /> |
|
|
|
<ProjectReference Include="..\..\src\EasyAbp.EShop.Payments.MongoDB\EasyAbp.EShop.Payments.MongoDB.csproj" /> |
|
|
|
<ProjectReference Include="..\EasyAbp.EShop.Payments.TestBase\EasyAbp.EShop.Payments.TestBase.csproj" /> |
|
|
|
</ItemGroup> |
|
|
|
|
|
|
|
@ -1,5 +1,4 @@ |
|
|
|
using System; |
|
|
|
using Mongo2Go; |
|
|
|
using Volo.Abp; |
|
|
|
using Volo.Abp.Data; |
|
|
|
using Volo.Abp.Modularity; |
|
|
|
@ -12,17 +11,11 @@ namespace EasyAbp.EShop.Payments.MongoDB |
|
|
|
)] |
|
|
|
public class EShopPaymentsMongoDbTestModule : AbpModule |
|
|
|
{ |
|
|
|
private static readonly MongoDbRunner MongoDbRunner = MongoDbRunner.Start(); |
|
|
|
|
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context) |
|
|
|
{ |
|
|
|
var connectionString = MongoDbRunner.ConnectionString.EnsureEndsWith('/') + |
|
|
|
"Db_" + |
|
|
|
Guid.NewGuid().ToString("N"); |
|
|
|
|
|
|
|
Configure<AbpDbConnectionOptions>(options => |
|
|
|
{ |
|
|
|
options.ConnectionStrings.Default = connectionString; |
|
|
|
options.ConnectionStrings.Default = MongoDbFixture.GetRandomConnectionString(); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -0,0 +1,34 @@ |
|
|
|
using System; |
|
|
|
using EphemeralMongo; |
|
|
|
|
|
|
|
namespace EasyAbp.EShop.Payments.MongoDB; |
|
|
|
|
|
|
|
public class MongoDbFixture : IDisposable |
|
|
|
{ |
|
|
|
public readonly static IMongoRunner MongoDbRunner; |
|
|
|
|
|
|
|
static MongoDbFixture() |
|
|
|
{ |
|
|
|
MongoDbRunner = MongoRunner.Run(new MongoRunnerOptions |
|
|
|
{ |
|
|
|
UseSingleNodeReplicaSet = true |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
public static string GetRandomConnectionString() |
|
|
|
{ |
|
|
|
return GetConnectionString("Db_" + Guid.NewGuid().ToString("N")); |
|
|
|
} |
|
|
|
|
|
|
|
public static string GetConnectionString(string databaseName) |
|
|
|
{ |
|
|
|
var stringArray = MongoDbRunner.ConnectionString.Split('?'); |
|
|
|
var connectionString = stringArray[0].EnsureEndsWith('/') + databaseName + "/?" + stringArray[1]; |
|
|
|
return connectionString; |
|
|
|
} |
|
|
|
|
|
|
|
public void Dispose() |
|
|
|
{ |
|
|
|
MongoDbRunner?.Dispose(); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -0,0 +1,9 @@ |
|
|
|
using Xunit; |
|
|
|
|
|
|
|
namespace EasyAbp.EShop.Payments.MongoDB; |
|
|
|
|
|
|
|
[CollectionDefinition(Name)] |
|
|
|
public class MongoTestCollection : ICollectionFixture<MongoDbFixture> |
|
|
|
{ |
|
|
|
public const string Name = "MongoDB Collection"; |
|
|
|
} |
|
|
|
@ -9,6 +9,7 @@ |
|
|
|
</PropertyGroup> |
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
<PackageReference Include="Volo.Abp.Ddd.Domain.Shared" Version="$(AbpVersion)" /> |
|
|
|
<PackageReference Include="Volo.Abp.Validation" Version="$(AbpVersion)" /> |
|
|
|
</ItemGroup> |
|
|
|
|
|
|
|
|
|
|
|
@ -1,4 +1,5 @@ |
|
|
|
using Volo.Abp.Modularity; |
|
|
|
using Volo.Abp.Domain; |
|
|
|
using Volo.Abp.Modularity; |
|
|
|
using Volo.Abp.Localization; |
|
|
|
using EasyAbp.EShop.Plugins.Localization; |
|
|
|
using Volo.Abp.Localization.ExceptionHandling; |
|
|
|
@ -9,7 +10,8 @@ using Volo.Abp.VirtualFileSystem; |
|
|
|
namespace EasyAbp.EShop.Plugins |
|
|
|
{ |
|
|
|
[DependsOn( |
|
|
|
typeof(AbpValidationModule) |
|
|
|
typeof(AbpValidationModule), |
|
|
|
typeof(AbpDddDomainSharedModule) |
|
|
|
)] |
|
|
|
public class EShopPluginsDomainSharedModule : AbpModule |
|
|
|
{ |
|
|
|
|
|
|
|
@ -2,7 +2,7 @@ |
|
|
|
|
|
|
|
<PropertyGroup> |
|
|
|
<TargetFramework>net7.0</TargetFramework> |
|
|
|
<RootNamespace /> |
|
|
|
<RootNamespace>EasyAbp.EShop.Plugins</RootNamespace> |
|
|
|
</PropertyGroup> |
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
|
|
|
|
@ -2,7 +2,7 @@ |
|
|
|
|
|
|
|
<PropertyGroup> |
|
|
|
<TargetFramework>net7.0</TargetFramework> |
|
|
|
<RootNamespace /> |
|
|
|
<RootNamespace>EasyAbp.EShop.Plugins</RootNamespace> |
|
|
|
</PropertyGroup> |
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
|
|
|
|
@ -2,7 +2,7 @@ |
|
|
|
|
|
|
|
<PropertyGroup> |
|
|
|
<TargetFramework>net7.0</TargetFramework> |
|
|
|
<RootNamespace /> |
|
|
|
<RootNamespace>EasyAbp.EShop.Plugins</RootNamespace> |
|
|
|
</PropertyGroup> |
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
|
|
|
|
@ -3,7 +3,7 @@ |
|
|
|
<PropertyGroup> |
|
|
|
<OutputType>Exe</OutputType> |
|
|
|
<TargetFramework>net7.0</TargetFramework> |
|
|
|
<RootNamespace /> |
|
|
|
<RootNamespace>EasyAbp.EShop.Plugins</RootNamespace> |
|
|
|
</PropertyGroup> |
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
|
|
|
|
@ -2,12 +2,15 @@ |
|
|
|
|
|
|
|
<PropertyGroup> |
|
|
|
<TargetFramework>net7.0</TargetFramework> |
|
|
|
<RootNamespace /> |
|
|
|
<RootNamespace>EasyAbp.EShop.Plugins</RootNamespace> |
|
|
|
</PropertyGroup> |
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" /> |
|
|
|
<PackageReference Include="Mongo2Go" Version="3.1.3" /> |
|
|
|
<PackageReference Include="EphemeralMongo.Core" Version="1.1.0" /> |
|
|
|
<PackageReference Include="EphemeralMongo6.runtime.linux-x64" Version="1.1.0" Condition="$([MSBuild]::IsOSPlatform('Linux'))" /> |
|
|
|
<PackageReference Include="EphemeralMongo6.runtime.osx-x64" Version="1.1.0" Condition="$([MSBuild]::IsOSPlatform('OSX'))" /> |
|
|
|
<PackageReference Include="EphemeralMongo6.runtime.win-x64" Version="1.1.0" Condition="$([MSBuild]::IsOSPlatform('Windows'))" /> |
|
|
|
<ProjectReference Include="..\..\src\EasyAbp.EShop.Plugins.MongoDB\EasyAbp.EShop.Plugins.MongoDB.csproj" /> |
|
|
|
<ProjectReference Include="..\EasyAbp.EShop.Plugins.TestBase\EasyAbp.EShop.Plugins.TestBase.csproj" /> |
|
|
|
</ItemGroup> |
|
|
|
|
|
|
|
@ -1,5 +1,4 @@ |
|
|
|
using System; |
|
|
|
using Mongo2Go; |
|
|
|
using Volo.Abp; |
|
|
|
using Volo.Abp.Data; |
|
|
|
using Volo.Abp.Modularity; |
|
|
|
@ -12,17 +11,11 @@ namespace EasyAbp.EShop.Plugins.MongoDB |
|
|
|
)] |
|
|
|
public class EShopPluginsMongoDbTestModule : AbpModule |
|
|
|
{ |
|
|
|
private static readonly MongoDbRunner MongoDbRunner = MongoDbRunner.Start(); |
|
|
|
|
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context) |
|
|
|
{ |
|
|
|
var connectionString = MongoDbRunner.ConnectionString.EnsureEndsWith('/') + |
|
|
|
"Db_" + |
|
|
|
Guid.NewGuid().ToString("N"); |
|
|
|
|
|
|
|
Configure<AbpDbConnectionOptions>(options => |
|
|
|
{ |
|
|
|
options.ConnectionStrings.Default = connectionString; |
|
|
|
options.ConnectionStrings.Default = MongoDbFixture.GetRandomConnectionString(); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -0,0 +1,34 @@ |
|
|
|
using System; |
|
|
|
using EphemeralMongo; |
|
|
|
|
|
|
|
namespace EasyAbp.EShop.Plugins.MongoDB; |
|
|
|
|
|
|
|
public class MongoDbFixture : IDisposable |
|
|
|
{ |
|
|
|
public readonly static IMongoRunner MongoDbRunner; |
|
|
|
|
|
|
|
static MongoDbFixture() |
|
|
|
{ |
|
|
|
MongoDbRunner = MongoRunner.Run(new MongoRunnerOptions |
|
|
|
{ |
|
|
|
UseSingleNodeReplicaSet = true |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
public static string GetRandomConnectionString() |
|
|
|
{ |
|
|
|
return GetConnectionString("Db_" + Guid.NewGuid().ToString("N")); |
|
|
|
} |
|
|
|
|
|
|
|
public static string GetConnectionString(string databaseName) |
|
|
|
{ |
|
|
|
var stringArray = MongoDbRunner.ConnectionString.Split('?'); |
|
|
|
var connectionString = stringArray[0].EnsureEndsWith('/') + databaseName + "/?" + stringArray[1]; |
|
|
|
return connectionString; |
|
|
|
} |
|
|
|
|
|
|
|
public void Dispose() |
|
|
|
{ |
|
|
|
MongoDbRunner?.Dispose(); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -0,0 +1,9 @@ |
|
|
|
using Xunit; |
|
|
|
|
|
|
|
namespace EasyAbp.EShop.Plugins.MongoDB; |
|
|
|
|
|
|
|
[CollectionDefinition(Name)] |
|
|
|
public class MongoTestCollection : ICollectionFixture<MongoDbFixture> |
|
|
|
{ |
|
|
|
public const string Name = "MongoDB Collection"; |
|
|
|
} |
|
|
|
@ -2,7 +2,7 @@ |
|
|
|
|
|
|
|
<PropertyGroup> |
|
|
|
<TargetFramework>net7.0</TargetFramework> |
|
|
|
<RootNamespace /> |
|
|
|
<RootNamespace>EasyAbp.EShop.Plugins</RootNamespace> |
|
|
|
</PropertyGroup> |
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
|
|
|
|
@ -10,6 +10,7 @@ |
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
<PackageReference Include="EasyAbp.Abp.Trees.Domain.Shared" Version="$(EasyAbpAbpTreesModuleVersion)" /> |
|
|
|
<PackageReference Include="Volo.Abp.Ddd.Domain.Shared" Version="$(AbpVersion)" /> |
|
|
|
<PackageReference Include="Volo.Abp.Validation" Version="$(AbpVersion)" /> |
|
|
|
<PackageReference Include="Volo.Abp.Json.Abstractions" Version="$(AbpVersion)" /> |
|
|
|
<ProjectReference Include="..\..\..\EasyAbp.EShop.Stores\src\EasyAbp.EShop.Stores.Domain.Shared\EasyAbp.EShop.Stores.Domain.Shared.csproj" /> |
|
|
|
|
|
|
|
@ -1,4 +1,5 @@ |
|
|
|
using EasyAbp.Abp.Trees; |
|
|
|
using Volo.Abp.Domain; |
|
|
|
using Volo.Abp.Modularity; |
|
|
|
using Volo.Abp.Localization; |
|
|
|
using EasyAbp.EShop.Products.Localization; |
|
|
|
@ -13,6 +14,7 @@ namespace EasyAbp.EShop.Products |
|
|
|
{ |
|
|
|
[DependsOn( |
|
|
|
typeof(AbpValidationModule), |
|
|
|
typeof(AbpDddDomainSharedModule), |
|
|
|
typeof(AbpJsonAbstractionsModule), |
|
|
|
typeof(AbpTreesDomainSharedModule), |
|
|
|
typeof(EShopStoresDomainSharedModule) |
|
|
|
|
|
|
|
@ -7,7 +7,10 @@ |
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" /> |
|
|
|
<PackageReference Include="Mongo2Go" Version="3.1.3" /> |
|
|
|
<PackageReference Include="EphemeralMongo.Core" Version="1.1.0" /> |
|
|
|
<PackageReference Include="EphemeralMongo6.runtime.linux-x64" Version="1.1.0" Condition="$([MSBuild]::IsOSPlatform('Linux'))" /> |
|
|
|
<PackageReference Include="EphemeralMongo6.runtime.osx-x64" Version="1.1.0" Condition="$([MSBuild]::IsOSPlatform('OSX'))" /> |
|
|
|
<PackageReference Include="EphemeralMongo6.runtime.win-x64" Version="1.1.0" Condition="$([MSBuild]::IsOSPlatform('Windows'))" /> |
|
|
|
<ProjectReference Include="..\..\src\EasyAbp.EShop.Products.MongoDB\EasyAbp.EShop.Products.MongoDB.csproj" /> |
|
|
|
<ProjectReference Include="..\EasyAbp.EShop.Products.TestBase\EasyAbp.EShop.Products.TestBase.csproj" /> |
|
|
|
</ItemGroup> |
|
|
|
|
|
|
|
@ -1,5 +1,4 @@ |
|
|
|
using System; |
|
|
|
using Mongo2Go; |
|
|
|
using Volo.Abp; |
|
|
|
using Volo.Abp.Data; |
|
|
|
using Volo.Abp.Modularity; |
|
|
|
@ -12,17 +11,11 @@ namespace EasyAbp.EShop.Products.MongoDB |
|
|
|
)] |
|
|
|
public class EShopProductsMongoDbTestModule : AbpModule |
|
|
|
{ |
|
|
|
private static readonly MongoDbRunner MongoDbRunner = MongoDbRunner.Start(); |
|
|
|
|
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context) |
|
|
|
{ |
|
|
|
var connectionString = MongoDbRunner.ConnectionString.EnsureEndsWith('/') + |
|
|
|
"Db_" + |
|
|
|
Guid.NewGuid().ToString("N"); |
|
|
|
|
|
|
|
Configure<AbpDbConnectionOptions>(options => |
|
|
|
{ |
|
|
|
options.ConnectionStrings.Default = connectionString; |
|
|
|
options.ConnectionStrings.Default = MongoDbFixture.GetRandomConnectionString(); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -0,0 +1,34 @@ |
|
|
|
using System; |
|
|
|
using EphemeralMongo; |
|
|
|
|
|
|
|
namespace EasyAbp.EShop.Products.MongoDB; |
|
|
|
|
|
|
|
public class MongoDbFixture : IDisposable |
|
|
|
{ |
|
|
|
public readonly static IMongoRunner MongoDbRunner; |
|
|
|
|
|
|
|
static MongoDbFixture() |
|
|
|
{ |
|
|
|
MongoDbRunner = MongoRunner.Run(new MongoRunnerOptions |
|
|
|
{ |
|
|
|
UseSingleNodeReplicaSet = true |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
public static string GetRandomConnectionString() |
|
|
|
{ |
|
|
|
return GetConnectionString("Db_" + Guid.NewGuid().ToString("N")); |
|
|
|
} |
|
|
|
|
|
|
|
public static string GetConnectionString(string databaseName) |
|
|
|
{ |
|
|
|
var stringArray = MongoDbRunner.ConnectionString.Split('?'); |
|
|
|
var connectionString = stringArray[0].EnsureEndsWith('/') + databaseName + "/?" + stringArray[1]; |
|
|
|
return connectionString; |
|
|
|
} |
|
|
|
|
|
|
|
public void Dispose() |
|
|
|
{ |
|
|
|
MongoDbRunner?.Dispose(); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -0,0 +1,9 @@ |
|
|
|
using Xunit; |
|
|
|
|
|
|
|
namespace EasyAbp.EShop.Products.MongoDB; |
|
|
|
|
|
|
|
[CollectionDefinition(Name)] |
|
|
|
public class MongoTestCollection : ICollectionFixture<MongoDbFixture> |
|
|
|
{ |
|
|
|
public const string Name = "MongoDB Collection"; |
|
|
|
} |
|
|
|
@ -9,6 +9,7 @@ |
|
|
|
</PropertyGroup> |
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
<PackageReference Include="Volo.Abp.Ddd.Domain.Shared" Version="$(AbpVersion)" /> |
|
|
|
<PackageReference Include="Volo.Abp.Validation" Version="$(AbpVersion)" /> |
|
|
|
</ItemGroup> |
|
|
|
|
|
|
|
|
|
|
|
@ -1,4 +1,5 @@ |
|
|
|
using Volo.Abp.Modularity; |
|
|
|
using Volo.Abp.Domain; |
|
|
|
using Volo.Abp.Modularity; |
|
|
|
using Volo.Abp.Localization; |
|
|
|
using EasyAbp.EShop.Stores.Localization; |
|
|
|
using Volo.Abp.Localization.ExceptionHandling; |
|
|
|
@ -9,7 +10,8 @@ using Volo.Abp.VirtualFileSystem; |
|
|
|
namespace EasyAbp.EShop.Stores |
|
|
|
{ |
|
|
|
[DependsOn( |
|
|
|
typeof(AbpValidationModule) |
|
|
|
typeof(AbpValidationModule), |
|
|
|
typeof(AbpDddDomainSharedModule) |
|
|
|
)] |
|
|
|
public class EShopStoresDomainSharedModule : AbpModule |
|
|
|
{ |
|
|
|
|
|
|
|
@ -7,7 +7,10 @@ |
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" /> |
|
|
|
<PackageReference Include="Mongo2Go" Version="3.1.3" /> |
|
|
|
<PackageReference Include="EphemeralMongo.Core" Version="1.1.0" /> |
|
|
|
<PackageReference Include="EphemeralMongo6.runtime.linux-x64" Version="1.1.0" Condition="$([MSBuild]::IsOSPlatform('Linux'))" /> |
|
|
|
<PackageReference Include="EphemeralMongo6.runtime.osx-x64" Version="1.1.0" Condition="$([MSBuild]::IsOSPlatform('OSX'))" /> |
|
|
|
<PackageReference Include="EphemeralMongo6.runtime.win-x64" Version="1.1.0" Condition="$([MSBuild]::IsOSPlatform('Windows'))" /> |
|
|
|
<ProjectReference Include="..\..\src\EasyAbp.EShop.Stores.MongoDB\EasyAbp.EShop.Stores.MongoDB.csproj" /> |
|
|
|
<ProjectReference Include="..\EasyAbp.EShop.Stores.TestBase\EasyAbp.EShop.Stores.TestBase.csproj" /> |
|
|
|
</ItemGroup> |
|
|
|
|
|
|
|
@ -1,5 +1,4 @@ |
|
|
|
using System; |
|
|
|
using Mongo2Go; |
|
|
|
using Volo.Abp; |
|
|
|
using Volo.Abp.Data; |
|
|
|
using Volo.Abp.Modularity; |
|
|
|
@ -12,17 +11,11 @@ namespace EasyAbp.EShop.Stores.MongoDB |
|
|
|
)] |
|
|
|
public class EShopStoresMongoDbTestModule : AbpModule |
|
|
|
{ |
|
|
|
private static readonly MongoDbRunner MongoDbRunner = MongoDbRunner.Start(); |
|
|
|
|
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context) |
|
|
|
{ |
|
|
|
var connectionString = MongoDbRunner.ConnectionString.EnsureEndsWith('/') + |
|
|
|
"Db_" + |
|
|
|
Guid.NewGuid().ToString("N"); |
|
|
|
|
|
|
|
Configure<AbpDbConnectionOptions>(options => |
|
|
|
{ |
|
|
|
options.ConnectionStrings.Default = connectionString; |
|
|
|
options.ConnectionStrings.Default = MongoDbFixture.GetRandomConnectionString(); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -0,0 +1,34 @@ |
|
|
|
using System; |
|
|
|
using EphemeralMongo; |
|
|
|
|
|
|
|
namespace EasyAbp.EShop.Stores.MongoDB; |
|
|
|
|
|
|
|
public class MongoDbFixture : IDisposable |
|
|
|
{ |
|
|
|
public readonly static IMongoRunner MongoDbRunner; |
|
|
|
|
|
|
|
static MongoDbFixture() |
|
|
|
{ |
|
|
|
MongoDbRunner = MongoRunner.Run(new MongoRunnerOptions |
|
|
|
{ |
|
|
|
UseSingleNodeReplicaSet = true |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
public static string GetRandomConnectionString() |
|
|
|
{ |
|
|
|
return GetConnectionString("Db_" + Guid.NewGuid().ToString("N")); |
|
|
|
} |
|
|
|
|
|
|
|
public static string GetConnectionString(string databaseName) |
|
|
|
{ |
|
|
|
var stringArray = MongoDbRunner.ConnectionString.Split('?'); |
|
|
|
var connectionString = stringArray[0].EnsureEndsWith('/') + databaseName + "/?" + stringArray[1]; |
|
|
|
return connectionString; |
|
|
|
} |
|
|
|
|
|
|
|
public void Dispose() |
|
|
|
{ |
|
|
|
MongoDbRunner?.Dispose(); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -0,0 +1,9 @@ |
|
|
|
using Xunit; |
|
|
|
|
|
|
|
namespace EasyAbp.EShop.Stores.MongoDB; |
|
|
|
|
|
|
|
[CollectionDefinition(Name)] |
|
|
|
public class MongoTestCollection : ICollectionFixture<MongoDbFixture> |
|
|
|
{ |
|
|
|
public const string Name = "MongoDB Collection"; |
|
|
|
} |
|
|
|
@ -9,6 +9,7 @@ |
|
|
|
</PropertyGroup> |
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
<PackageReference Include="Volo.Abp.Ddd.Domain.Shared" Version="$(AbpVersion)" /> |
|
|
|
<PackageReference Include="Volo.Abp.Validation" Version="$(AbpVersion)" /> |
|
|
|
</ItemGroup> |
|
|
|
|
|
|
|
|
|
|
|
@ -1,4 +1,5 @@ |
|
|
|
using Volo.Abp.Modularity; |
|
|
|
using Volo.Abp.Domain; |
|
|
|
using Volo.Abp.Modularity; |
|
|
|
using Volo.Abp.Localization; |
|
|
|
using EasyAbp.EShop.Plugins.Baskets.Localization; |
|
|
|
using EasyAbp.EShop.Products; |
|
|
|
@ -11,6 +12,7 @@ namespace EasyAbp.EShop.Plugins.Baskets |
|
|
|
{ |
|
|
|
[DependsOn( |
|
|
|
typeof(AbpValidationModule), |
|
|
|
typeof(AbpDddDomainSharedModule), |
|
|
|
typeof(EShopProductsDomainSharedModule) |
|
|
|
)] |
|
|
|
public class EShopPluginsBasketsDomainSharedModule : AbpModule |
|
|
|
|
|
|
|
@ -2,7 +2,7 @@ |
|
|
|
|
|
|
|
<PropertyGroup> |
|
|
|
<TargetFramework>net7.0</TargetFramework> |
|
|
|
<RootNamespace /> |
|
|
|
<RootNamespace>EasyAbp.EShop.Plugins.Baskets</RootNamespace> |
|
|
|
</PropertyGroup> |
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
|
|
|
|
@ -2,7 +2,7 @@ |
|
|
|
|
|
|
|
<PropertyGroup> |
|
|
|
<TargetFramework>net7.0</TargetFramework> |
|
|
|
<RootNamespace /> |
|
|
|
<RootNamespace>EasyAbp.EShop.Plugins.Baskets</RootNamespace> |
|
|
|
</PropertyGroup> |
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
|
|
|
|
@ -2,7 +2,7 @@ |
|
|
|
|
|
|
|
<PropertyGroup> |
|
|
|
<TargetFramework>net7.0</TargetFramework> |
|
|
|
<RootNamespace /> |
|
|
|
<RootNamespace>EasyAbp.EShop.Plugins.Baskets</RootNamespace> |
|
|
|
</PropertyGroup> |
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
|
|
|
|
@ -3,7 +3,7 @@ |
|
|
|
<PropertyGroup> |
|
|
|
<OutputType>Exe</OutputType> |
|
|
|
<TargetFramework>net7.0</TargetFramework> |
|
|
|
<RootNamespace /> |
|
|
|
<RootNamespace>EasyAbp.EShop.Plugins.Baskets</RootNamespace> |
|
|
|
</PropertyGroup> |
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
|
|
|
|
@ -2,12 +2,15 @@ |
|
|
|
|
|
|
|
<PropertyGroup> |
|
|
|
<TargetFramework>net7.0</TargetFramework> |
|
|
|
<RootNamespace /> |
|
|
|
<RootNamespace>EasyAbp.EShop.Plugins.Baskets</RootNamespace> |
|
|
|
</PropertyGroup> |
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" /> |
|
|
|
<PackageReference Include="Mongo2Go" Version="3.1.3" /> |
|
|
|
<PackageReference Include="EphemeralMongo.Core" Version="1.1.0" /> |
|
|
|
<PackageReference Include="EphemeralMongo6.runtime.linux-x64" Version="1.1.0" Condition="$([MSBuild]::IsOSPlatform('Linux'))" /> |
|
|
|
<PackageReference Include="EphemeralMongo6.runtime.osx-x64" Version="1.1.0" Condition="$([MSBuild]::IsOSPlatform('OSX'))" /> |
|
|
|
<PackageReference Include="EphemeralMongo6.runtime.win-x64" Version="1.1.0" Condition="$([MSBuild]::IsOSPlatform('Windows'))" /> |
|
|
|
<ProjectReference Include="..\..\src\EasyAbp.EShop.Plugins.Baskets.MongoDB\EasyAbp.EShop.Plugins.Baskets.MongoDB.csproj" /> |
|
|
|
<ProjectReference Include="..\EasyAbp.EShop.Plugins.Baskets.TestBase\EasyAbp.EShop.Plugins.Baskets.TestBase.csproj" /> |
|
|
|
</ItemGroup> |
|
|
|
|
|
|
|
@ -12,13 +12,9 @@ namespace EasyAbp.EShop.Plugins.Baskets.MongoDB |
|
|
|
{ |
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context) |
|
|
|
{ |
|
|
|
var connectionString = MongoDbFixture.ConnectionString.EnsureEndsWith('/') + |
|
|
|
"Db_" + |
|
|
|
Guid.NewGuid().ToString("N"); |
|
|
|
|
|
|
|
Configure<AbpDbConnectionOptions>(options => |
|
|
|
{ |
|
|
|
options.ConnectionStrings.Default = connectionString; |
|
|
|
options.ConnectionStrings.Default = MongoDbFixture.GetRandomConnectionString(); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -1,17 +1,30 @@ |
|
|
|
using System; |
|
|
|
using Mongo2Go; |
|
|
|
using EphemeralMongo; |
|
|
|
|
|
|
|
namespace EasyAbp.EShop.Plugins.Baskets.MongoDB |
|
|
|
{ |
|
|
|
public class MongoDbFixture : IDisposable |
|
|
|
{ |
|
|
|
private static readonly MongoDbRunner MongoDbRunner; |
|
|
|
public static readonly string ConnectionString; |
|
|
|
public readonly static IMongoRunner MongoDbRunner; |
|
|
|
|
|
|
|
static MongoDbFixture() |
|
|
|
{ |
|
|
|
MongoDbRunner = MongoDbRunner.Start(); |
|
|
|
ConnectionString = MongoDbRunner.ConnectionString; |
|
|
|
MongoDbRunner = MongoRunner.Run(new MongoRunnerOptions |
|
|
|
{ |
|
|
|
UseSingleNodeReplicaSet = true |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
public static string GetRandomConnectionString() |
|
|
|
{ |
|
|
|
return GetConnectionString("Db_" + Guid.NewGuid().ToString("N")); |
|
|
|
} |
|
|
|
|
|
|
|
public static string GetConnectionString(string databaseName) |
|
|
|
{ |
|
|
|
var stringArray = MongoDbRunner.ConnectionString.Split('?'); |
|
|
|
var connectionString = stringArray[0].EnsureEndsWith('/') + databaseName + "/?" + stringArray[1]; |
|
|
|
return connectionString; |
|
|
|
} |
|
|
|
|
|
|
|
public void Dispose() |
|
|
|
|
|
|
|
@ -2,7 +2,7 @@ |
|
|
|
|
|
|
|
<PropertyGroup> |
|
|
|
<TargetFramework>net7.0</TargetFramework> |
|
|
|
<RootNamespace /> |
|
|
|
<RootNamespace>EasyAbp.EShop.Plugins.Baskets</RootNamespace> |
|
|
|
</PropertyGroup> |
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
|
|
|
|
@ -9,6 +9,7 @@ |
|
|
|
</PropertyGroup> |
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
<PackageReference Include="Volo.Abp.Ddd.Domain.Shared" Version="$(AbpVersion)" /> |
|
|
|
<PackageReference Include="Volo.Abp.Validation" Version="$(AbpVersion)" /> |
|
|
|
</ItemGroup> |
|
|
|
|
|
|
|
|
|
|
|
@ -1,4 +1,5 @@ |
|
|
|
using Volo.Abp.Modularity; |
|
|
|
using Volo.Abp.Domain; |
|
|
|
using Volo.Abp.Modularity; |
|
|
|
using Volo.Abp.Localization; |
|
|
|
using EasyAbp.EShop.Plugins.Booking.Localization; |
|
|
|
using Volo.Abp.Localization.ExceptionHandling; |
|
|
|
@ -9,7 +10,8 @@ using Volo.Abp.VirtualFileSystem; |
|
|
|
namespace EasyAbp.EShop.Plugins.Booking; |
|
|
|
|
|
|
|
[DependsOn( |
|
|
|
typeof(AbpValidationModule) |
|
|
|
typeof(AbpValidationModule), |
|
|
|
typeof(AbpDddDomainSharedModule) |
|
|
|
)] |
|
|
|
public class EShopPluginsBookingDomainSharedModule : AbpModule |
|
|
|
{ |
|
|
|
|
|
|
|
@ -7,7 +7,10 @@ |
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" /> |
|
|
|
<PackageReference Include="Mongo2Go" Version="3.1.3" /> |
|
|
|
<PackageReference Include="EphemeralMongo.Core" Version="1.1.0" /> |
|
|
|
<PackageReference Include="EphemeralMongo6.runtime.linux-x64" Version="1.1.0" Condition="$([MSBuild]::IsOSPlatform('Linux'))" /> |
|
|
|
<PackageReference Include="EphemeralMongo6.runtime.osx-x64" Version="1.1.0" Condition="$([MSBuild]::IsOSPlatform('OSX'))" /> |
|
|
|
<PackageReference Include="EphemeralMongo6.runtime.win-x64" Version="1.1.0" Condition="$([MSBuild]::IsOSPlatform('Windows'))" /> |
|
|
|
<ProjectReference Include="..\..\src\EasyAbp.EShop.Plugins.Booking.MongoDB\EasyAbp.EShop.Plugins.Booking.MongoDB.csproj" /> |
|
|
|
<ProjectReference Include="..\EasyAbp.EShop.Plugins.Booking.TestBase\EasyAbp.EShop.Plugins.Booking.TestBase.csproj" /> |
|
|
|
</ItemGroup> |
|
|
|
|
|
|
|
@ -13,14 +13,9 @@ public class BookingMongoDbTestModule : AbpModule |
|
|
|
{ |
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context) |
|
|
|
{ |
|
|
|
var stringArray = MongoDbFixture.ConnectionString.Split('?'); |
|
|
|
var connectionString = stringArray[0].EnsureEndsWith('/') + |
|
|
|
"Db_" + |
|
|
|
Guid.NewGuid().ToString("N") + "/?" + stringArray[1]; |
|
|
|
|
|
|
|
Configure<AbpDbConnectionOptions>(options => |
|
|
|
{ |
|
|
|
options.ConnectionStrings.Default = connectionString; |
|
|
|
options.ConnectionStrings.Default = MongoDbFixture.GetRandomConnectionString(); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -1,17 +1,30 @@ |
|
|
|
using System; |
|
|
|
using Mongo2Go; |
|
|
|
using EphemeralMongo; |
|
|
|
|
|
|
|
namespace EasyAbp.EShop.Plugins.Booking.MongoDB; |
|
|
|
|
|
|
|
public class MongoDbFixture : IDisposable |
|
|
|
{ |
|
|
|
private static readonly MongoDbRunner MongoDbRunner; |
|
|
|
public static readonly string ConnectionString; |
|
|
|
public readonly static IMongoRunner MongoDbRunner; |
|
|
|
|
|
|
|
static MongoDbFixture() |
|
|
|
{ |
|
|
|
MongoDbRunner = MongoDbRunner.Start(singleNodeReplSet: true, singleNodeReplSetWaitTimeout: 20); |
|
|
|
ConnectionString = MongoDbRunner.ConnectionString; |
|
|
|
MongoDbRunner = MongoRunner.Run(new MongoRunnerOptions |
|
|
|
{ |
|
|
|
UseSingleNodeReplicaSet = true |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
public static string GetRandomConnectionString() |
|
|
|
{ |
|
|
|
return GetConnectionString("Db_" + Guid.NewGuid().ToString("N")); |
|
|
|
} |
|
|
|
|
|
|
|
public static string GetConnectionString(string databaseName) |
|
|
|
{ |
|
|
|
var stringArray = MongoDbRunner.ConnectionString.Split('?'); |
|
|
|
var connectionString = stringArray[0].EnsureEndsWith('/') + databaseName + "/?" + stringArray[1]; |
|
|
|
return connectionString; |
|
|
|
} |
|
|
|
|
|
|
|
public void Dispose() |
|
|
|
|
|
|
|
@ -9,6 +9,7 @@ |
|
|
|
</PropertyGroup> |
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
<PackageReference Include="Volo.Abp.Ddd.Domain.Shared" Version="$(AbpVersion)" /> |
|
|
|
<PackageReference Include="Volo.Abp.Validation" Version="$(AbpVersion)" /> |
|
|
|
<ProjectReference Include="..\..\..\..\modules\EasyAbp.EShop.Stores\src\EasyAbp.EShop.Stores.Domain.Shared\EasyAbp.EShop.Stores.Domain.Shared.csproj" /> |
|
|
|
</ItemGroup> |
|
|
|
|
|
|
|
@ -1,4 +1,5 @@ |
|
|
|
using Volo.Abp.Modularity; |
|
|
|
using Volo.Abp.Domain; |
|
|
|
using Volo.Abp.Modularity; |
|
|
|
using Volo.Abp.Localization; |
|
|
|
using EasyAbp.EShop.Plugins.Coupons.Localization; |
|
|
|
using EasyAbp.EShop.Stores; |
|
|
|
@ -11,6 +12,7 @@ namespace EasyAbp.EShop.Plugins.Coupons |
|
|
|
{ |
|
|
|
[DependsOn( |
|
|
|
typeof(AbpValidationModule), |
|
|
|
typeof(AbpDddDomainSharedModule), |
|
|
|
typeof(EShopStoresDomainSharedModule) |
|
|
|
)] |
|
|
|
public class EShopPluginsCouponsDomainSharedModule : AbpModule |
|
|
|
|
|
|
|
@ -7,7 +7,10 @@ |
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" /> |
|
|
|
<PackageReference Include="Mongo2Go" Version="3.1.3" /> |
|
|
|
<PackageReference Include="EphemeralMongo.Core" Version="1.1.0" /> |
|
|
|
<PackageReference Include="EphemeralMongo6.runtime.linux-x64" Version="1.1.0" Condition="$([MSBuild]::IsOSPlatform('Linux'))" /> |
|
|
|
<PackageReference Include="EphemeralMongo6.runtime.osx-x64" Version="1.1.0" Condition="$([MSBuild]::IsOSPlatform('OSX'))" /> |
|
|
|
<PackageReference Include="EphemeralMongo6.runtime.win-x64" Version="1.1.0" Condition="$([MSBuild]::IsOSPlatform('Windows'))" /> |
|
|
|
<ProjectReference Include="..\..\src\EasyAbp.EShop.Plugins.Coupons.MongoDB\EasyAbp.EShop.Plugins.Coupons.MongoDB.csproj" /> |
|
|
|
<ProjectReference Include="..\EasyAbp.EShop.Plugins.Coupons.TestBase\EasyAbp.EShop.Plugins.Coupons.TestBase.csproj" /> |
|
|
|
</ItemGroup> |
|
|
|
|
|
|
|
@ -12,13 +12,9 @@ namespace EasyAbp.EShop.Plugins.Coupons.MongoDB |
|
|
|
{ |
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context) |
|
|
|
{ |
|
|
|
var connectionString = MongoDbFixture.ConnectionString.EnsureEndsWith('/') + |
|
|
|
"Db_" + |
|
|
|
Guid.NewGuid().ToString("N"); |
|
|
|
|
|
|
|
Configure<AbpDbConnectionOptions>(options => |
|
|
|
{ |
|
|
|
options.ConnectionStrings.Default = connectionString; |
|
|
|
options.ConnectionStrings.Default = MongoDbFixture.GetRandomConnectionString(); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -1,17 +1,30 @@ |
|
|
|
using System; |
|
|
|
using Mongo2Go; |
|
|
|
using EphemeralMongo; |
|
|
|
|
|
|
|
namespace EasyAbp.EShop.Plugins.Coupons.MongoDB |
|
|
|
{ |
|
|
|
public class MongoDbFixture : IDisposable |
|
|
|
{ |
|
|
|
private static readonly MongoDbRunner MongoDbRunner; |
|
|
|
public static readonly string ConnectionString; |
|
|
|
public readonly static IMongoRunner MongoDbRunner; |
|
|
|
|
|
|
|
static MongoDbFixture() |
|
|
|
{ |
|
|
|
MongoDbRunner = MongoDbRunner.Start(); |
|
|
|
ConnectionString = MongoDbRunner.ConnectionString; |
|
|
|
MongoDbRunner = MongoRunner.Run(new MongoRunnerOptions |
|
|
|
{ |
|
|
|
UseSingleNodeReplicaSet = true |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
public static string GetRandomConnectionString() |
|
|
|
{ |
|
|
|
return GetConnectionString("Db_" + Guid.NewGuid().ToString("N")); |
|
|
|
} |
|
|
|
|
|
|
|
public static string GetConnectionString(string databaseName) |
|
|
|
{ |
|
|
|
var stringArray = MongoDbRunner.ConnectionString.Split('?'); |
|
|
|
var connectionString = stringArray[0].EnsureEndsWith('/') + databaseName + "/?" + stringArray[1]; |
|
|
|
return connectionString; |
|
|
|
} |
|
|
|
|
|
|
|
public void Dispose() |
|
|
|
|
|
|
|
@ -9,6 +9,7 @@ |
|
|
|
</PropertyGroup> |
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
<PackageReference Include="Volo.Abp.Ddd.Domain.Shared" Version="$(AbpVersion)" /> |
|
|
|
<PackageReference Include="Volo.Abp.Validation" Version="$(AbpVersion)" /> |
|
|
|
</ItemGroup> |
|
|
|
|
|
|
|
|
|
|
|
@ -1,4 +1,5 @@ |
|
|
|
using Volo.Abp.Modularity; |
|
|
|
using Volo.Abp.Domain; |
|
|
|
using Volo.Abp.Modularity; |
|
|
|
using Volo.Abp.Localization; |
|
|
|
using EasyAbp.EShop.Plugins.FlashSales.Localization; |
|
|
|
using Volo.Abp.Localization.ExceptionHandling; |
|
|
|
@ -9,7 +10,8 @@ using Volo.Abp.VirtualFileSystem; |
|
|
|
namespace EasyAbp.EShop.Plugins.FlashSales; |
|
|
|
|
|
|
|
[DependsOn( |
|
|
|
typeof(AbpValidationModule) |
|
|
|
typeof(AbpValidationModule), |
|
|
|
typeof(AbpDddDomainSharedModule) |
|
|
|
)] |
|
|
|
public class EShopPluginsFlashSalesDomainSharedModule : AbpModule |
|
|
|
{ |
|
|
|
|
|
|
|
@ -7,7 +7,10 @@ |
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" /> |
|
|
|
<PackageReference Include="Mongo2Go" Version="3.1.3" /> |
|
|
|
<PackageReference Include="EphemeralMongo.Core" Version="1.1.0" /> |
|
|
|
<PackageReference Include="EphemeralMongo6.runtime.linux-x64" Version="1.1.0" Condition="$([MSBuild]::IsOSPlatform('Linux'))" /> |
|
|
|
<PackageReference Include="EphemeralMongo6.runtime.osx-x64" Version="1.1.0" Condition="$([MSBuild]::IsOSPlatform('OSX'))" /> |
|
|
|
<PackageReference Include="EphemeralMongo6.runtime.win-x64" Version="1.1.0" Condition="$([MSBuild]::IsOSPlatform('Windows'))" /> |
|
|
|
<ProjectReference Include="..\..\src\EasyAbp.EShop.Plugins.FlashSales.MongoDB\EasyAbp.EShop.Plugins.FlashSales.MongoDB.csproj" /> |
|
|
|
<ProjectReference Include="..\EasyAbp.EShop.Plugins.FlashSales.TestBase\EasyAbp.EShop.Plugins.FlashSales.TestBase.csproj" /> |
|
|
|
</ItemGroup> |
|
|
|
|
|
|
|
@ -13,14 +13,9 @@ public class EShopPluginsFlashSalesMongoDbTestModule : AbpModule |
|
|
|
{ |
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context) |
|
|
|
{ |
|
|
|
var stringArray = MongoDbFixture.ConnectionString.Split('?'); |
|
|
|
var connectionString = stringArray[0].EnsureEndsWith('/') + |
|
|
|
"Db_" + |
|
|
|
Guid.NewGuid().ToString("N") + "/?" + stringArray[1]; |
|
|
|
|
|
|
|
Configure<AbpDbConnectionOptions>(options => |
|
|
|
{ |
|
|
|
options.ConnectionStrings.Default = connectionString; |
|
|
|
options.ConnectionStrings.Default = MongoDbFixture.GetRandomConnectionString(); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -1,17 +1,30 @@ |
|
|
|
using System; |
|
|
|
using Mongo2Go; |
|
|
|
using EphemeralMongo; |
|
|
|
|
|
|
|
namespace EasyAbp.EShop.Plugins.FlashSales.MongoDB; |
|
|
|
|
|
|
|
public class MongoDbFixture : IDisposable |
|
|
|
{ |
|
|
|
private static readonly MongoDbRunner MongoDbRunner; |
|
|
|
public static readonly string ConnectionString; |
|
|
|
public readonly static IMongoRunner MongoDbRunner; |
|
|
|
|
|
|
|
static MongoDbFixture() |
|
|
|
{ |
|
|
|
MongoDbRunner = MongoDbRunner.Start(singleNodeReplSet: true, singleNodeReplSetWaitTimeout: 20); |
|
|
|
ConnectionString = MongoDbRunner.ConnectionString; |
|
|
|
MongoDbRunner = MongoRunner.Run(new MongoRunnerOptions |
|
|
|
{ |
|
|
|
UseSingleNodeReplicaSet = true |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
public static string GetRandomConnectionString() |
|
|
|
{ |
|
|
|
return GetConnectionString("Db_" + Guid.NewGuid().ToString("N")); |
|
|
|
} |
|
|
|
|
|
|
|
public static string GetConnectionString(string databaseName) |
|
|
|
{ |
|
|
|
var stringArray = MongoDbRunner.ConnectionString.Split('?'); |
|
|
|
var connectionString = stringArray[0].EnsureEndsWith('/') + databaseName + "/?" + stringArray[1]; |
|
|
|
return connectionString; |
|
|
|
} |
|
|
|
|
|
|
|
public void Dispose() |
|
|
|
|
|
|
|
@ -4,7 +4,7 @@ using Microsoft.Extensions.DependencyInjection; |
|
|
|
using Shouldly; |
|
|
|
using Xunit; |
|
|
|
|
|
|
|
namespace EasyAbp.EShop.Products.DaprActorsInventory.Domain; |
|
|
|
namespace EasyAbp.EShop.Products.DaprActorsInventory; |
|
|
|
|
|
|
|
public class DaprActorsProductInventoryProviderTests : ProductsDaprActorsInventoryTestBase |
|
|
|
{ |
|
|
|
|
|
|
|
@ -3,7 +3,7 @@ using Volo.Abp.Authorization; |
|
|
|
using Volo.Abp.Autofac; |
|
|
|
using Volo.Abp.Modularity; |
|
|
|
|
|
|
|
namespace EasyAbp.EShop.Products.DaprActorsInventory.Domain; |
|
|
|
namespace EasyAbp.EShop.Products.DaprActorsInventory; |
|
|
|
|
|
|
|
[DependsOn( |
|
|
|
typeof(AbpAutofacModule), |
|
|
|
|
|
|
|
@ -2,7 +2,7 @@ |
|
|
|
|
|
|
|
<PropertyGroup> |
|
|
|
<TargetFramework>net7.0</TargetFramework> |
|
|
|
<RootNamespace>EasyAbp.EShop.Products.DaprActorsInventory.Domain</RootNamespace> |
|
|
|
<RootNamespace>EasyAbp.EShop.Products.DaprActorsInventory</RootNamespace> |
|
|
|
</PropertyGroup> |
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
|
|
|
|
@ -2,7 +2,7 @@ using System.Threading.Tasks; |
|
|
|
using EasyAbp.EShop.Plugins.Inventories.DaprActors; |
|
|
|
using Volo.Abp.DependencyInjection; |
|
|
|
|
|
|
|
namespace EasyAbp.EShop.Products.DaprActorsInventory.Domain; |
|
|
|
namespace EasyAbp.EShop.Products.DaprActorsInventory; |
|
|
|
|
|
|
|
public class FakeInventoryActor : IInventoryActor, ITransientDependency |
|
|
|
{ |
|
|
|
|
|
|
|
@ -2,11 +2,10 @@ using System; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
|
using Volo.Abp; |
|
|
|
using Volo.Abp.Modularity; |
|
|
|
using Volo.Abp.Testing; |
|
|
|
using Volo.Abp.Uow; |
|
|
|
|
|
|
|
namespace EasyAbp.EShop.Products.DaprActorsInventory.Domain |
|
|
|
namespace EasyAbp.EShop.Products.DaprActorsInventory |
|
|
|
{ |
|
|
|
/* All test classes are derived from this class, directly or indirectly. */ |
|
|
|
public abstract class |
|
|
|
|
|
|
|
@ -5,7 +5,7 @@ using EasyAbp.EShop.Plugins.Inventories.DaprActors; |
|
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
|
using Volo.Abp.DependencyInjection; |
|
|
|
|
|
|
|
namespace EasyAbp.EShop.Products.DaprActorsInventory.Domain; |
|
|
|
namespace EasyAbp.EShop.Products.DaprActorsInventory; |
|
|
|
|
|
|
|
[Dependency(ReplaceServices = true)] |
|
|
|
public class TestActorProxyFactory : IActorProxyFactory, ITransientDependency |
|
|
|
|
|
|
|
@ -3,7 +3,7 @@ using Volo.Abp.Authorization; |
|
|
|
using Volo.Abp.Autofac; |
|
|
|
using Volo.Abp.Modularity; |
|
|
|
|
|
|
|
namespace EasyAbp.EShop.Products.OrleansGrainsInventory.Domain; |
|
|
|
namespace EasyAbp.EShop.Products.OrleansGrainsInventory; |
|
|
|
|
|
|
|
[DependsOn( |
|
|
|
typeof(AbpAutofacModule), |
|
|
|
|
|
|
|
@ -2,7 +2,7 @@ |
|
|
|
|
|
|
|
<PropertyGroup> |
|
|
|
<TargetFramework>net7.0</TargetFramework> |
|
|
|
<RootNamespace>EasyAbp.EShop.Products.OrleansGrainsInventory.Domain</RootNamespace> |
|
|
|
<RootNamespace>EasyAbp.EShop.Products.OrleansGrainsInventory</RootNamespace> |
|
|
|
</PropertyGroup> |
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
|
|
|
|
@ -2,7 +2,7 @@ using System.Threading.Tasks; |
|
|
|
using EasyAbp.EShop.Plugins.Inventories.OrleansGrains; |
|
|
|
using Volo.Abp.DependencyInjection; |
|
|
|
|
|
|
|
namespace EasyAbp.EShop.Products.OrleansGrainsInventory.Domain; |
|
|
|
namespace EasyAbp.EShop.Products.OrleansGrainsInventory; |
|
|
|
|
|
|
|
public class FakeInventoryGrain : IInventoryGrain, ITransientDependency |
|
|
|
{ |
|
|
|
|
|
|
|
@ -4,7 +4,7 @@ using Microsoft.Extensions.DependencyInjection; |
|
|
|
using Shouldly; |
|
|
|
using Xunit; |
|
|
|
|
|
|
|
namespace EasyAbp.EShop.Products.OrleansGrainsInventory.Domain; |
|
|
|
namespace EasyAbp.EShop.Products.OrleansGrainsInventory; |
|
|
|
|
|
|
|
public class OrleansGrainsProductInventoryProviderTests : ProductsOrleansGrainsInventoryTestBase |
|
|
|
{ |
|
|
|
|
|
|
|
@ -2,11 +2,10 @@ using System; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
|
using Volo.Abp; |
|
|
|
using Volo.Abp.Modularity; |
|
|
|
using Volo.Abp.Testing; |
|
|
|
using Volo.Abp.Uow; |
|
|
|
|
|
|
|
namespace EasyAbp.EShop.Products.OrleansGrainsInventory.Domain |
|
|
|
namespace EasyAbp.EShop.Products.OrleansGrainsInventory |
|
|
|
{ |
|
|
|
/* All test classes are derived from this class, directly or indirectly. */ |
|
|
|
public abstract class |
|
|
|
|
|
|
|
@ -6,7 +6,7 @@ using Orleans; |
|
|
|
using Orleans.Runtime; |
|
|
|
using Volo.Abp.DependencyInjection; |
|
|
|
|
|
|
|
namespace EasyAbp.EShop.Products.OrleansGrainsInventory.Domain; |
|
|
|
namespace EasyAbp.EShop.Products.OrleansGrainsInventory; |
|
|
|
|
|
|
|
[Dependency(ReplaceServices = true)] |
|
|
|
public class TestGrainFactory : IGrainFactory, ITransientDependency |
|
|
|
|
|
|
|
@ -10,6 +10,7 @@ |
|
|
|
</PropertyGroup> |
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
<PackageReference Include="Volo.Abp.Ddd.Domain.Shared" Version="$(AbpVersion)" /> |
|
|
|
<PackageReference Include="Volo.Abp.Validation" Version="$(AbpVersion)" /> |
|
|
|
</ItemGroup> |
|
|
|
|
|
|
|
|
|
|
|
@ -1,4 +1,5 @@ |
|
|
|
using Volo.Abp.Modularity; |
|
|
|
using Volo.Abp.Domain; |
|
|
|
using Volo.Abp.Modularity; |
|
|
|
using Volo.Abp.Localization; |
|
|
|
using EasyAbp.EShop.Plugins.Promotions.Localization; |
|
|
|
using Volo.Abp.Localization.ExceptionHandling; |
|
|
|
@ -9,7 +10,8 @@ using Volo.Abp.VirtualFileSystem; |
|
|
|
namespace EasyAbp.EShop.Plugins.Promotions; |
|
|
|
|
|
|
|
[DependsOn( |
|
|
|
typeof(AbpValidationModule) |
|
|
|
typeof(AbpValidationModule), |
|
|
|
typeof(AbpDddDomainSharedModule) |
|
|
|
)] |
|
|
|
public class EShopPluginsPromotionsDomainSharedModule : AbpModule |
|
|
|
{ |
|
|
|
|
|
|
|
@ -10,7 +10,10 @@ |
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" /> |
|
|
|
<PackageReference Include="Mongo2Go" Version="3.1.3" /> |
|
|
|
<PackageReference Include="EphemeralMongo.Core" Version="1.1.0" /> |
|
|
|
<PackageReference Include="EphemeralMongo6.runtime.linux-x64" Version="1.1.0" Condition="$([MSBuild]::IsOSPlatform('Linux'))" /> |
|
|
|
<PackageReference Include="EphemeralMongo6.runtime.osx-x64" Version="1.1.0" Condition="$([MSBuild]::IsOSPlatform('OSX'))" /> |
|
|
|
<PackageReference Include="EphemeralMongo6.runtime.win-x64" Version="1.1.0" Condition="$([MSBuild]::IsOSPlatform('Windows'))" /> |
|
|
|
<ProjectReference Include="..\..\src\EasyAbp.EShop.Plugins.Promotions.MongoDB\EasyAbp.EShop.Plugins.Promotions.MongoDB.csproj" /> |
|
|
|
<ProjectReference Include="..\EasyAbp.EShop.Plugins.Promotions.TestBase\EasyAbp.EShop.Plugins.Promotions.TestBase.csproj" /> |
|
|
|
</ItemGroup> |
|
|
|
|
|
|
|
@ -1,17 +1,30 @@ |
|
|
|
using System; |
|
|
|
using Mongo2Go; |
|
|
|
using EphemeralMongo; |
|
|
|
|
|
|
|
namespace EasyAbp.EShop.Plugins.Promotions.MongoDB; |
|
|
|
|
|
|
|
public class MongoDbFixture : IDisposable |
|
|
|
{ |
|
|
|
private static readonly MongoDbRunner MongoDbRunner; |
|
|
|
public static readonly string ConnectionString; |
|
|
|
public readonly static IMongoRunner MongoDbRunner; |
|
|
|
|
|
|
|
static MongoDbFixture() |
|
|
|
{ |
|
|
|
MongoDbRunner = MongoDbRunner.Start(singleNodeReplSet: true, singleNodeReplSetWaitTimeout: 20); |
|
|
|
ConnectionString = MongoDbRunner.ConnectionString; |
|
|
|
MongoDbRunner = MongoRunner.Run(new MongoRunnerOptions |
|
|
|
{ |
|
|
|
UseSingleNodeReplicaSet = true |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
public static string GetRandomConnectionString() |
|
|
|
{ |
|
|
|
return GetConnectionString("Db_" + Guid.NewGuid().ToString("N")); |
|
|
|
} |
|
|
|
|
|
|
|
public static string GetConnectionString(string databaseName) |
|
|
|
{ |
|
|
|
var stringArray = MongoDbRunner.ConnectionString.Split('?'); |
|
|
|
var connectionString = stringArray[0].EnsureEndsWith('/') + databaseName + "/?" + stringArray[1]; |
|
|
|
return connectionString; |
|
|
|
} |
|
|
|
|
|
|
|
public void Dispose() |
|
|
|
|
|
|
|
@ -13,14 +13,9 @@ public class PromotionsMongoDbTestModule : AbpModule |
|
|
|
{ |
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context) |
|
|
|
{ |
|
|
|
var stringArray = MongoDbFixture.ConnectionString.Split('?'); |
|
|
|
var connectionString = stringArray[0].EnsureEndsWith('/') + |
|
|
|
"Db_" + |
|
|
|
Guid.NewGuid().ToString("N") + "/?" + stringArray[1]; |
|
|
|
|
|
|
|
Configure<AbpDbConnectionOptions>(options => |
|
|
|
{ |
|
|
|
options.ConnectionStrings.Default = connectionString; |
|
|
|
options.ConnectionStrings.Default = MongoDbFixture.GetRandomConnectionString(); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -51,7 +51,7 @@ |
|
|
|
<PackageReference Include="EasyAbp.PaymentService.WeChatPay.Web" Version="$(EasyAbpPaymentServiceModuleVersion)" /> |
|
|
|
<PackageReference Include="EasyAbp.PaymentService.Prepayment.Web" Version="$(EasyAbpPaymentServiceModuleVersion)" /> |
|
|
|
<PackageReference Include="EasyAbp.BookingService.Web" Version="$(EasyAbpBookingServiceModuleVersion)" /> |
|
|
|
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonXLite" Version="2.2.*-*" /> |
|
|
|
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonXLite" Version="2.3.*-*" /> |
|
|
|
<PackageReference Include="Volo.Abp.Autofac" Version="$(AbpVersion)" /> |
|
|
|
<PackageReference Include="Volo.Abp.AspNetCore.Authentication.JwtBearer" Version="$(AbpVersion)" /> |
|
|
|
<PackageReference Include="Volo.Abp.AspNetCore.Serilog" Version="$(AbpVersion)" /> |
|
|
|
|
|
|
|
@ -3,6 +3,6 @@ |
|
|
|
"name": "my-app", |
|
|
|
"private": true, |
|
|
|
"dependencies": { |
|
|
|
"@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~2.2.0-rc.1" |
|
|
|
"@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~2.3.0" |
|
|
|
} |
|
|
|
} |
|
|
|
@ -2,10 +2,10 @@ |
|
|
|
# yarn lockfile v1 |
|
|
|
|
|
|
|
|
|
|
|
"@abp/aspnetcore.mvc.ui.theme.leptonxlite@~2.2.0-rc.1": |
|
|
|
version "2.2.0" |
|
|
|
resolved "https://registry.npmmirror.com/@abp/aspnetcore.mvc.ui.theme.leptonxlite/-/aspnetcore.mvc.ui.theme.leptonxlite-2.2.0.tgz#dc76d1d869e16876288c90f5fec31df3a99bb628" |
|
|
|
integrity sha512-mAAptSqGWQu+GefI1XHlP7KF8PncWreuC9u09rUdZ1cixFURy7PaG/n/QMNj9YJSVIb+vPsnFjYDeTtNbrxU/g== |
|
|
|
"@abp/aspnetcore.mvc.ui.theme.leptonxlite@~2.3.0": |
|
|
|
version "2.3.0" |
|
|
|
resolved "https://registry.npmmirror.com/@abp/aspnetcore.mvc.ui.theme.leptonxlite/-/aspnetcore.mvc.ui.theme.leptonxlite-2.3.0.tgz#7e05ce2a897de0f0bb016e0ae4a9adfd0260e7be" |
|
|
|
integrity sha512-d7p8Pv6g8aocjBIBKHMF8fFDeVzWqkriz6uKy3oowCKSe5tqzq3j35Um7kEu7DapPf9MyBPq8+z9VsGbxJCjww== |
|
|
|
dependencies: |
|
|
|
"@abp/aspnetcore.mvc.ui.theme.shared" "~7.2.1" |
|
|
|
|
|
|
|
|