Пример #1
0
        public void Should_be_able_to_delete()
        {
            var fragment = A.New <ContentFragmentModel>();

            var insertResult = _client.Post <ContentFragmentModel>("/api/content", fragment).Result;

            Assert.That(insertResult.Id, Is.GreaterThan(0));

            insertResult.Content = "Changed";

            var deletedResult = _client.Delete <ContentFragmentModel>($"/api/content/{insertResult.Id}").Result;

            var result = _client.Get <ContentFragmentPagedQueryResultsModel>("/api/content").Result;

            Assert.That(result.Results.Any(x => x.Id == deletedResult.Id), Is.False);
        }