From 100b537319e82e328d94d6af41ff1297fddd61e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Sat, 16 Sep 2017 10:43:50 +0300 Subject: [PATCH] Added Delete test to PersonAppServiceClientProxy_Tests --- .../PersonAppServiceClientProxy_Tests.cs | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/DynamicProxying/PersonAppServiceClientProxy_Tests.cs b/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/DynamicProxying/PersonAppServiceClientProxy_Tests.cs index 093326b436..c025496870 100644 --- a/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/DynamicProxying/PersonAppServiceClientProxy_Tests.cs +++ b/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/DynamicProxying/PersonAppServiceClientProxy_Tests.cs @@ -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]