Browse Source

Added Delete test to PersonAppServiceClientProxy_Tests

pull/113/head
Halil İbrahim Kalkan 9 years ago
parent
commit
100b537319
  1. 23
      test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/DynamicProxying/PersonAppServiceClientProxy_Tests.cs

23
test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/DynamicProxying/PersonAppServiceClientProxy_Tests.cs

@ -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]

Loading…
Cancel
Save