|
|
@ -23,7 +23,18 @@ namespace Volo.Abp.Http.DynamicProxying |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
[Fact] |
|
|
[Fact] |
|
|
public async Task Test_GetList() |
|
|
public async Task Get() |
|
|
|
|
|
{ |
|
|
|
|
|
var firstPerson = _personRepository.GetList().First(); |
|
|
|
|
|
|
|
|
|
|
|
var person = await _peopleAppService.Get(firstPerson.Id); |
|
|
|
|
|
person.ShouldNotBeNull(); |
|
|
|
|
|
person.Id.ShouldBe(firstPerson.Id); |
|
|
|
|
|
person.Name.ShouldBe(firstPerson.Name); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
[Fact] |
|
|
|
|
|
public async Task GetList() |
|
|
{ |
|
|
{ |
|
|
var people = await _peopleAppService.GetList(new PagedAndSortedResultRequestDto()); |
|
|
var people = await _peopleAppService.GetList(new PagedAndSortedResultRequestDto()); |
|
|
people.TotalCount.ShouldBeGreaterThan(0); |
|
|
people.TotalCount.ShouldBeGreaterThan(0); |
|
|
@ -31,14 +42,14 @@ namespace Volo.Abp.Http.DynamicProxying |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
[Fact] |
|
|
[Fact] |
|
|
public async Task Test_GetById() |
|
|
public async Task Delete() |
|
|
{ |
|
|
{ |
|
|
var firstPerson = _personRepository.GetList().First(); |
|
|
var firstPerson = _personRepository.GetList().First(); |
|
|
|
|
|
|
|
|
var person = await _peopleAppService.Get(firstPerson.Id); |
|
|
await _peopleAppService.Delete(firstPerson.Id); |
|
|
person.ShouldNotBeNull(); |
|
|
|
|
|
person.Id.ShouldBe(firstPerson.Id); |
|
|
firstPerson = _personRepository.GetList().FirstOrDefault(p => p.Id == firstPerson.Id); |
|
|
person.Name.ShouldBe(firstPerson.Name); |
|
|
firstPerson.ShouldBeNull(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
[Fact] |
|
|
[Fact] |
|
|
|