public async Task ShouldNotCreateWithContentAsync() { var dto = new CreatePageWithContentInputDto { Title = "test", Url = _data.Page_1_Url, Content = "my-test-content" }; await Should.ThrowAsync <Exception>(async() => await _pageAdminAppService.CreatePageWithContentAsync(dto)); }
public async Task ShouldCreateWithContentAsync() { var dto = new CreatePageWithContentInputDto { Title = "test", Url = "test-url", Content = "my-test-content" }; await Should.NotThrowAsync(async() => await _pageAdminAppService.CreatePageWithContentAsync(dto)); var page = await _pageRepository.GetByUrlAsync(dto.Url); var content = await _contentRepository.GetAsync(nameof(Page), page.Id.ToString()); content.Value.ShouldBe(dto.Content); }
public virtual Task <PageDto> CreatePageWithContentAsync(CreatePageWithContentInputDto input) { return(PageAdminAppService.CreatePageWithContentAsync(input)); }