public Get ( string projectId, string collectionId = null, string collectionKey = null ) : Task
|
||
projectId | string | Project id. |
collectionId | string | Collection id defining the collection for which folders will be returned. |
collectionKey | string | Collection key defining the collection for which folders will be returned. |
Результат | Task
|
public async Task Get_WithNullProjectId_ThrowsException(FolderSyncanoClient client) { try { //when await client.Get(null, TestData.CollectionId); throw new Exception("Get should throw an exception"); } catch (Exception e) { //then e.ShouldBeType<ArgumentNullException>(); } }
public async Task Get_WithInvalidProjectId_ThrowsException(FolderSyncanoClient client) { try { //when await client.Get("abcde", TestData.CollectionId); throw new Exception("Get should throw an exception"); } catch (Exception e) { //then e.ShouldBeType<SyncanoException>(); } }
public async Task Get_ByCollectionKey(FolderSyncanoClient client) { //when var response = await client.Get(TestData.ProjectId, collectionKey: TestData.CollectionKey); //then response.ShouldNotBeEmpty(); response.Any(f => f.Name == TestData.FolderName).ShouldBeTrue(); }