mirror of https://github.com/EasyAbp/EShop.git
91 changed files with 472 additions and 171 deletions
@ -1,13 +1,13 @@ |
|||||
<Project> |
<Project> |
||||
<PropertyGroup> |
<PropertyGroup> |
||||
|
|
||||
<AbpVersion>7.2.1</AbpVersion> |
<AbpVersion>7.3.0</AbpVersion> |
||||
<EasyAbpAbpTreesModuleVersion>2.11.0</EasyAbpAbpTreesModuleVersion> |
<EasyAbpAbpTreesModuleVersion>2.12.0</EasyAbpAbpTreesModuleVersion> |
||||
<EasyAbpPaymentServiceModuleVersion>2.6.0</EasyAbpPaymentServiceModuleVersion> |
<EasyAbpPaymentServiceModuleVersion>2.7.0</EasyAbpPaymentServiceModuleVersion> |
||||
<EasyAbpAbpTagHelperPlusModuleVersion>1.5.0</EasyAbpAbpTagHelperPlusModuleVersion> |
<EasyAbpAbpTagHelperPlusModuleVersion>1.6.0</EasyAbpAbpTagHelperPlusModuleVersion> |
||||
<EasyAbpBookingServiceModuleVersion>0.6.0</EasyAbpBookingServiceModuleVersion> |
<EasyAbpBookingServiceModuleVersion>0.7.0</EasyAbpBookingServiceModuleVersion> |
||||
<DaprSdkVersion>1.9.0</DaprSdkVersion> |
<DaprSdkVersion>1.11.0</DaprSdkVersion> |
||||
<OrleansVersion>3.6.5</OrleansVersion> |
<OrleansVersion>3.7.1</OrleansVersion> |
||||
<NodaMoneyVersion>1.0.5</NodaMoneyVersion> |
<NodaMoneyVersion>1.0.5</NodaMoneyVersion> |
||||
|
|
||||
</PropertyGroup> |
</PropertyGroup> |
||||
|
|||||
@ -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"; |
||||
|
} |
||||
@ -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"; |
||||
|
} |
||||
@ -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"; |
||||
|
} |
||||
@ -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"; |
||||
|
} |
||||
@ -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"; |
||||
|
} |
||||
Loading…
Reference in new issue