临河任务调度
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.

32 lines
782B

  1. using System.Threading.Tasks;
  2. using Shouldly;
  3. using Volo.Abp.Modularity;
  4. using Xunit;
  5. namespace Himp.TaskScheduling.Samples;
  6. public abstract class SampleAppService_Tests<TStartupModule> : TaskSchedulingApplicationTestBase<TStartupModule>
  7. where TStartupModule : IAbpModule
  8. {
  9. private readonly ISampleAppService _sampleAppService;
  10. protected SampleAppService_Tests()
  11. {
  12. _sampleAppService = GetRequiredService<ISampleAppService>();
  13. }
  14. [Fact]
  15. public async Task GetAsync()
  16. {
  17. var result = await _sampleAppService.GetAsync();
  18. result.Value.ShouldBe(42);
  19. }
  20. [Fact]
  21. public async Task GetAuthorizedAsync()
  22. {
  23. var result = await _sampleAppService.GetAuthorizedAsync();
  24. result.Value.ShouldBe(42);
  25. }
  26. }