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.

42 lines
1.1 KiB

2 years ago
  1. using Shentun.Peis.GuideTypes;
  2. using Shentun.Peis.Models;
  3. using Shentun.Peis.Sexs;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using Volo.Abp;
  10. using Volo.Abp.Domain.Repositories;
  11. using Volo.Abp.Identity;
  12. using Volo.Abp.Uow;
  13. using Xunit;
  14. using Xunit.Abstractions;
  15. namespace Shentun.Peis
  16. {
  17. public class ApiWorkTest : PeisApplicationTestBase
  18. {
  19. private readonly GuideTypeAppService _appService;
  20. private readonly ITestOutputHelper _output;
  21. private readonly IUnitOfWorkManager _unitOfWorkManager;
  22. public ApiWorkTest(ITestOutputHelper testOutputHelper)
  23. {
  24. _output = testOutputHelper;
  25. _unitOfWorkManager = GetRequiredService<IUnitOfWorkManager>();
  26. _appService = GetRequiredService<GuideTypeAppService>();
  27. }
  28. [Fact]
  29. //[UnitOfWork]
  30. public async Task TestApi()
  31. {
  32. using (var aaa = _unitOfWorkManager.Begin(true, true))
  33. {
  34. await _appService.TestApi();
  35. }
  36. }
  37. }
  38. }