GetOne() public méthode

Get folder for a specified collection and folder name. The collection_id/collection_key parameter means that one can use either one of them - collection_id or collection_key. User API key usage permitted if read_data permission is added to specified folder through folder.authorize(), collection.authorize() or project.authorize().
public GetOne ( string projectId, string folderName, string collectionId = null, string collectionKey = null ) : Task
projectId string Project id.
folderName string Folder name defining folder.
collectionId string Collection id defining a collection for which the folder will be returned.
collectionKey string Collection key defining a collection for which the folder will be returned.
Résultat Task
 public async Task GetOne_WithNullProjectId_ThrowsException(FolderSyncanoClient client)
 {
     try
     {
         //when
         await client.GetOne(null, TestData.FolderName, TestData.CollectionId);
         throw new Exception("GetOne should throw an exception");
     }
     catch (Exception e)
     {
         //then
         e.ShouldBeType<ArgumentNullException>();
     }
 }
 public async Task GetOne_WithInvalidFolderName_ThrowsException(FolderSyncanoClient client)
 {
     try
     {
         //when
         await client.GetOne(TestData.ProjectId, "abcde", TestData.CollectionId);
         throw new Exception("GetOne should throw an exception");
     }
     catch (Exception e)
     {
         //then
         e.ShouldBeType<SyncanoException>();
     }
 }
        public async Task GetOne_ByCollectionKey(FolderSyncanoClient client)
        {
            //when
            var folder = await client.GetOne(TestData.ProjectId, TestData.FolderName, collectionKey: TestData.CollectionKey);

            //then
            folder.Id.ShouldEqual(TestData.FolderId);
            folder.Name.ShouldEqual(TestData.FolderName);
        }