示例#1
0
        public async Task FolderOperation_DeleteFolder_FolderIsDeleted()
        {
            var response = await JohnApi.GetFolder(_folderId);

            response.EnsureSuccessStatusCode();
            var jsonFolder = JToken.Parse(await response.Content.ReadAsStringAsync());

            await JohnApi.DeleteFolder(_folderId, jsonFolder["version"].ToObject <int>());

            Harness.WaitWhileFolderDeleted(_folderId);

            var notFoundResponse = await JohnApi.GetFolder(_folderId);

            notFoundResponse.IsSuccessStatusCode.Should().Be(false);
            response.StatusCode.Should().Be(HttpStatusCode.Forbidden);
        }