public void GetSingleObjectTest() { var singleDataObject = _serviceObject.GetSingle($"projects/{_configData.ProjectId}"); Assert.IsNotNull(singleDataObject); Assert.AreEqual(singleDataObject.Data.Id, _configData.ProjectId); }
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); }
/* Get methods for Accounts end. */ /* Get methods for Projects start. */ public GcProject GetProjectById(int projectId) { var urlPath = $"projects/{projectId}"; return(_projectClient.GetSingle(urlPath).Data); }
/* Get method for Me ends. */ /* Get methods for Accounts start. */ public GcAccount GetAccountById(int accountId) { var urlPath = $"accounts/{accountId}"; return(_accountClient.GetSingle(urlPath).Data); }
/* Get method for Me starts. */ public GcMe GetMe() { return(_meClient.GetSingle("me").Data); }
/* Get method for Files of Items ends. */ /* Get methods for Templates start. */ public GcTemplate GetTemplateById(int templateId) { var urlPath = $"templates/{templateId}"; return(_templateClient.GetSingle(urlPath).Data); }
/* Get methods for Statuses of Projects end. */ /* Get methods for Items start. */ public GcItem GetItemById(string itemId) { var urlPath = $"items/{itemId}"; return(_itemClient.GetSingle(urlPath).Data); }
/* Get methods for Projects end. */ /* Get methods for Statuses of Projects start. */ public GcStatus GetStatusById(int projectId, int statusId) { var urlPath = $"projects/{projectId}/statuses/{statusId}"; return(_statusClient.GetSingle(urlPath).Data); }