Authorize() публичный Метод

Adds container-level permission to specified User API client. Requires Backend API key with Admin permission role.
public Authorize ( string apiClientId, Permissions permission, string projectId ) : Task
apiClientId string User API client id.
permission Permissions User API client's permission to add.
projectId string Project id defining project that permission will be added to.
Результат Task
 public async Task Authorize_WithInvalidProjectId_ThrowsException(ProjectSyncanoClient client)
 {
     try
     {
         //when
         await client.Authorize(TestData.UserApiClientId, Permissions.CreateData, "abcde");
         throw new Exception("Authorize should throw an exception");
     }
     catch (Exception e)
     {
         //then
         e.ShouldBeType<SyncanoException>();
     }
 }
        public async Task Deauthorize_WithReadDataPermissions(ProjectSyncanoClient client)
        {
            //given
            string projectName = "Deauthorize Test " + DateTime.Now.ToLongTimeString() + " " +
                                DateTime.Now.ToShortDateString();

            var project = await client.New(projectName);
            await client.Authorize(TestData.UserApiClientId, Permissions.ReadData, project.Id);

            //when
            var result = await client.Deauthorize(TestData.UserApiClientId, Permissions.ReadData, project.Id);

            //then
            result.ShouldBeTrue();

            //cleanup
            await client.Delete(project.Id);
        }
 public async Task Authorize_WithNoUserApiKey_ThrowsException(ProjectSyncanoClient client)
 {
     try
     {
         //when
         await client.Authorize(null, Permissions.CreateData, TestData.ProjectId);
         throw new Exception("Authorize should throw an exception");
     }
     catch (Exception e)
     {
         //then
         e.ShouldBeType<ArgumentNullException>();
     }
 }