You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
1.5 KiB
63 lines
1.5 KiB
using Shentun.Peis.CardRegisters;
|
|
using Shentun.Peis.Enums;
|
|
using Shentun.Peis.IncludeDetails;
|
|
using Shentun.Peis.Models;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Volo.Abp.Domain.Repositories;
|
|
using Volo.Abp.Uow;
|
|
using Xunit.Abstractions;
|
|
using Xunit;
|
|
using Shentun.Peis.Items;
|
|
using Shentun.Utilities;
|
|
|
|
namespace Shentun.Peis
|
|
{
|
|
|
|
|
|
public class ItemManagerTest : PeisDomainTestBase
|
|
{
|
|
private readonly ItemManager _itemManager;
|
|
|
|
private readonly ITestOutputHelper _output;
|
|
private readonly IUnitOfWorkManager _unitOfWorkManager;
|
|
|
|
public ItemManagerTest(ITestOutputHelper output)
|
|
{
|
|
_output = output;
|
|
_itemManager = GetRequiredService<ItemManager>();
|
|
_unitOfWorkManager = GetRequiredService<IUnitOfWorkManager>();
|
|
}
|
|
|
|
|
|
|
|
[UnitOfWork]
|
|
public async void CheckAndDeleteAsyncTest()
|
|
{
|
|
var id = new Guid("3a0e8292-6c97-0866-4047-de7c8390a94c");
|
|
using (IUnitOfWork unitOfWork = _unitOfWorkManager.Begin())
|
|
{
|
|
await _itemManager.CheckAndDeleteAsync(id);
|
|
|
|
_output.WriteLine("123");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//[Fact]
|
|
//public async void CreateAsyncTest()
|
|
//{
|
|
// var entity = new Item();
|
|
// var newentity = await _itemManager.CreateAsync(entity);
|
|
// _output.WriteLine(newentity.Id.ToString());
|
|
//}
|
|
|
|
|
|
}
|
|
}
|