public async Task DeleteDraft() { var siteId = await MakeSite().ConfigureAwait(false); using var api = CreateApi(); MyPage page = await MyPage.CreateAsync(api).ConfigureAwait(false); page.SiteId = siteId; page.Title = "Startpage"; page.Text = "Welcome"; page.IsHidden = true; page.Published = DateTime.Now; await PageRepository.Save(page).ConfigureAwait(false); await PageRepository.SaveDraft(page).ConfigureAwait(false); var draftId = page.Id; await PageRepository.DeleteDraft(draftId).ConfigureAwait(false); var retrieved = await PageRepository.GetDraftById <MyPage>(draftId).ConfigureAwait(false); Assert.IsNull(retrieved); }