public async Task TestAddFoldersBatch() { var batch = new BatchSession(this.Session); var service = new DLAppService(batch); var repositoryId = GroupId; await service.AddFolderAsync(repositoryId, ParentFolderId, FolderName, string.Empty, null); await service.AddFolderAsync(repositoryId, ParentFolderId, FolderName2, string.Empty, null); var array = await batch.InvokeAsync(); Assert.AreEqual(FolderName, array.ElementAt(0).name); Assert.AreEqual(FolderName2, array.ElementAt(1).name); await this.DeleteFoldersBatch(batch); }
public async Task TestAddFolder() { var service = new DLAppService(this.Session); var repositoryId = GroupId; var folder = await service.AddFolderAsync(repositoryId, ParentFolderId, FolderName, string.Empty, null); Assert.AreEqual(FolderName, folder.name); var count = await service.GetFoldersCountAsync(repositoryId, ParentFolderId, 0, false); Assert.AreEqual(1, count); await this.DeleteFolder(); }