From f3ee251880a6a7784db9bc5a829d0ebc1cc07be9 Mon Sep 17 00:00:00 2001 From: enisn Date: Fri, 22 Jan 2021 11:29:07 +0300 Subject: [PATCH] CmsKit - Add test for GetByEntityAsync --- .../Contents/ContentAdminAppService_Tests.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Contents/ContentAdminAppService_Tests.cs b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Contents/ContentAdminAppService_Tests.cs index 34c90cbf6e..1263014d83 100644 --- a/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Contents/ContentAdminAppService_Tests.cs +++ b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Contents/ContentAdminAppService_Tests.cs @@ -128,5 +128,15 @@ namespace Volo.CmsKit.Contents await Should.NotThrowAsync(async () => await _service.DeleteAsync(_data.Content_2_Id)); } + + [Fact] + public async Task ShouldGetByEntityAsync() + { + var entity = await _service.GetByEntityAsync(_data.Content_1_EntityType, _data.Content_1_EntityId); + + entity.ShouldNotBeNull(); + entity.EntityId.ShouldBe(_data.Content_1_EntityId); + entity.EntityType.ShouldBe(_data.Content_1_EntityType); + } } }