mirror of https://github.com/abpframework/abp.git
2 changed files with 32 additions and 3 deletions
@ -0,0 +1,32 @@ |
|||
using System; |
|||
using System.Threading.Tasks; |
|||
using Shouldly; |
|||
using Volo.CmsKit.Public.Pages; |
|||
using Xunit; |
|||
|
|||
namespace Volo.CmsKit.Pages |
|||
{ |
|||
public class PagePublicAppService_Tests : CmsKitApplicationTestBase |
|||
{ |
|||
private readonly CmsKitTestData _data; |
|||
private readonly IPageAppService _pageAppService; |
|||
|
|||
public PagePublicAppService_Tests() |
|||
{ |
|||
_data = GetRequiredService<CmsKitTestData>(); |
|||
_pageAppService = GetRequiredService<IPageAppService>(); |
|||
} |
|||
|
|||
[Fact] |
|||
public async Task ShouldGetByUrlAsync() |
|||
{ |
|||
await Should.NotThrowAsync(async () => await _pageAppService.GetByUrlAsync(_data.Page_1_Url)); |
|||
} |
|||
|
|||
[Fact] |
|||
public async Task ShouldNotGetByUrlAsync() |
|||
{ |
|||
await Should.ThrowAsync<Exception>(async () => await _pageAppService.GetByUrlAsync("not-exist-url")); |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue