protected override async Task <PageCollectionModel> OnCommitAsync(PageCollectionUpdateValues values)
        {
            pageCollection.SetTitle(values.Title);
            pageCollection.SetSortModel(values.Sort);

            await pageCollectionService.UpdateCollectionAsync(pageCollection, HttpContext.RequestAborted);

            return(GetPageCollectionModel(pageCollection));
        }
        public async Task UpdateCollection()
        {
            var pageCollection = (await pageCollectionService.CreateCollectionAsync("Test collection", "TestPage", PageSortMode.FirstOld, null)).Data;

            pageCollection.SetTitle("New title");
            pageCollection.SetSortModel(PageSortMode.FirstNew);

            var result = await pageCollectionService.UpdateCollectionAsync(pageCollection);

            Assert.True(result.Succeeded);
            Assert.Equal("New title", pageCollection.Title);
            Assert.Equal(PageSortMode.FirstNew, pageCollection.SortMode);
        }