private async Task <ICollection <GcDataObject <T1> > > GetObjectCollectionAsync <T1>(string urlPath, List <int> ids) { using (var repo = new GcDataRepository <T1>(_apiKey, _userEmail)) { return(await repo.GetObjectCollectionAsync(urlPath, ids)); } }
public void GetAllObjects_InvalidCredential() { _serviceObject = new GcDataRepository <GcProject>("123", _configData.Email); var allDataObject = _serviceObject.GetAll("projects"); Assert.IsNotNull(allDataObject); Assert.AreEqual(allDataObject.Data, null); }
public void GetSingleObject_InvalidCredential() { _serviceObject = new GcDataRepository <GcProject>("123", "abc"); var singleDataObject = _serviceObject.GetSingle($"projects/{_configData.ProjectId}"); Assert.IsNotNull(singleDataObject); Assert.AreEqual(singleDataObject.Data, null); }
private async Task <ICollection <T1> > GetCollectionAsync <T1>(string urlPath) { using (var repo = new GcDataRepository <T1>(_apiKey, _userEmail)) { var result = await repo.GetAllAsync(urlPath); return(result.Data); } }
/* Post methods for Items end. */ private async Task <T1> GetSingleAsync <T1>(string urlPath) { using (var repo = new GcDataRepository <T1>(_apiKey, _userEmail)) { var result = await repo.GetSingleAsync(urlPath); return(result.Data); } }
public void GetObjectCollection_InvalidCredential() { var projectIds = new List <int> { _configData.ProjectId }; _serviceObject = new GcDataRepository <GcProject>("123", _configData.Email); var someDataObject = _serviceObject.GetObjectCollection("projects/", projectIds); Assert.IsNotNull(someDataObject); Assert.AreEqual(someDataObject.ToList()[0].Data, null); Assert.AreEqual(someDataObject.ToList().Count, 1); }
public GcConnectClient(string apiKey, string userEmail) { _meClient = new GcDataRepository <GcMe>(apiKey, userEmail); _accountClient = new GcDataRepository <GcAccount>(apiKey, userEmail); _projectClient = new GcDataRepository <GcProject>(apiKey, userEmail); _statusClient = new GcDataRepository <GcStatus>(apiKey, userEmail); _itemClient = new GcDataRepository <GcItem>(apiKey, userEmail); _templateClient = new GcDataRepository <GcTemplate>(apiKey, userEmail); _fileClient = new GcDataRepository <GcFile>(apiKey, userEmail); _postClient = new GcDataRepository <string>(apiKey, userEmail); _apiKey = apiKey; _userEmail = userEmail; }
public void InitializeTests() { _configData = new GcTestConfigData(); _serviceObject = new GcDataRepository <GcProject>(_configData.ApiKey, _configData.Email); }