Browse Source

CmsKit - Add test for GetByEntityAsync

pull/7404/head
enisn 6 years ago
parent
commit
f3ee251880
  1. 10
      modules/cms-kit/test/Volo.CmsKit.Application.Tests/Contents/ContentAdminAppService_Tests.cs

10
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);
}
}
}

Loading…
Cancel
Save