public Task<bool> Deauthorize(string apiClientId, ApiKeyPermission permission) { if (apiClientId == null) throw new ArgumentNullException(); return _syncanoClient.GetAsync("apikey.deauthorize", new { api_client_id = apiClientId, permission = ApiKeyPermissionByStringConverter.GetString(permission) }); }
public async Task Deauthorize_WithNullApiKeyId_ThrowsException(ApiKeySyncanoClient client) { try { //when await client.Deauthorize(null, ApiKeyPermission.AccessSync); throw new Exception("Deauthorize should throw an exception"); } catch (Exception e) { //then e.ShouldBeType<ArgumentNullException>(); } }