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.WebPeis.Models;using Shentun.WebPeis.Persons;using Shentun.WebPeis.Wechats;using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using Volo.Abp.Domain.Repositories;using Volo.Abp.Modularity;using Volo.Abp.Uow;using Xunit;using Xunit.Abstractions;
namespace Shentun.WebPeis{ public abstract class PersonAppServiceTest<TStartupModule> : WebPeisApplicationTestBase<TStartupModule> where TStartupModule : IAbpModule { private readonly IRepository<Person> _repository; private readonly PersonAppService _appService; //private readonly ITestOutputHelper _output;
private readonly IUnitOfWorkManager _unitOfWorkManager; public PersonAppServiceTest() { //ITestOutputHelper testOutputHelper
//_output = testOutputHelper;
_unitOfWorkManager = GetRequiredService<IUnitOfWorkManager>(); _repository = GetRequiredService<IRepository<Person>>(); _appService = GetRequiredService<PersonAppService>(); //_output = GetRequiredService<ITestOutputHelper>();
} [Fact] public async Task GetWechatUserTokenAsync() { using (var unitOfWork = _unitOfWorkManager.Begin(isTransactional: true)) {
var entity = new WechatUserJsCodeInputDto() { JsCode = "0c1yTa0w3mErQ23eot3w3ocsxw4yTa0P" };
var newEntity = await _appService.GetWechatUserTokenAsync(entity); await unitOfWork.CompleteAsync(); } } }}
|