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.
|
|
using Shentun.Peis.GuideTypes;using Shouldly;using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using Volo.Abp.Application.Dtos;using Xunit;using Xunit.Abstractions;
namespace Shentun.Peis{ public class GuideTypeAppServiceTest: PeisApplicationTestBase { private readonly GuideTypeAppService _guideTypeAppService; private readonly ITestOutputHelper _testOutputHelper; public GuideTypeAppServiceTest(ITestOutputHelper testOutputHelper) { _testOutputHelper = testOutputHelper; _guideTypeAppService = GetRequiredService<GuideTypeAppService>(); }
[Fact] public async Task GetList() { PagedAndSortedResultRequestDto qc = new PagedAndSortedResultRequestDto() { Sorting = "displayorder"}; var result = await _guideTypeAppService.GetListAsync(qc); result.TotalCount.ShouldBeGreaterThanOrEqualTo(4); Console.WriteLine(result.TotalCount); _testOutputHelper.WriteLine(result.TotalCount.ToString()); foreach (var item in result.Items) { Console.WriteLine(item.DisplayName); _testOutputHelper.WriteLine(item.DisplayName); }
}
[Fact] public async Task Create() {
var result = await _guideTypeAppService.CreateAsync(new CreateGuideTypeDto() { DisplayName = "Foo", }); _testOutputHelper.WriteLine(result.Id.ToString());
}
}}
|