Added Delete test to PersonAppServiceClientProxy_Tests

pull/112/head
Halil İbrahim Kalkan 7 years ago
parent 0083892153
commit 100b537319

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

Loading…
Cancel
Save