mirror of https://github.com/EasyAbp/EShop.git
4 changed files with 103 additions and 10 deletions
@ -0,0 +1,15 @@ |
|||
using System; |
|||
|
|||
namespace EasyAbp.EShop.Payments |
|||
{ |
|||
public static class PaymentsTestData |
|||
{ |
|||
public static Guid Order1 { get; } = Guid.NewGuid(); |
|||
|
|||
public static Guid Order2 { get; } = Guid.NewGuid(); |
|||
|
|||
public static Guid Store1 { get; } = Guid.NewGuid(); |
|||
|
|||
public static Guid Payment1 { get; } = Guid.NewGuid(); |
|||
} |
|||
} |
|||
@ -0,0 +1,28 @@ |
|||
using System.Threading.Tasks; |
|||
using EasyAbp.EShop.Payments.Payments; |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.Threading; |
|||
|
|||
namespace EasyAbp.EShop.Payments |
|||
{ |
|||
public class PaymentsTestDataBuilder : ITransientDependency |
|||
{ |
|||
private readonly IPaymentRepository _paymentRepository; |
|||
|
|||
public PaymentsTestDataBuilder(IPaymentRepository paymentRepository) |
|||
{ |
|||
_paymentRepository = paymentRepository; |
|||
} |
|||
|
|||
public void Build() |
|||
{ |
|||
AsyncHelper.RunSync(BuildAsync); |
|||
} |
|||
|
|||
public async Task BuildAsync() |
|||
{ |
|||
// TODO: How to create payment?
|
|||
// await _paymentRepository.InsertAsync(new Payment());
|
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue