Exemplo n.º 1
0
        public void GetSingleObjectTest()
        {
            var singleDataObject = _serviceObject.GetSingle($"projects/{_configData.ProjectId}");

            Assert.IsNotNull(singleDataObject);
            Assert.AreEqual(singleDataObject.Data.Id, _configData.ProjectId);
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        /* Get methods for Accounts end. */

        /* Get methods for Projects start. */

        public GcProject GetProjectById(int projectId)
        {
            var urlPath = $"projects/{projectId}";

            return(_projectClient.GetSingle(urlPath).Data);
        }
Exemplo n.º 4
0
        /* Get method for Me ends. */

        /* Get methods  for Accounts start. */

        public GcAccount GetAccountById(int accountId)
        {
            var urlPath = $"accounts/{accountId}";

            return(_accountClient.GetSingle(urlPath).Data);
        }
Exemplo n.º 5
0
 /* Get method for Me starts. */
 public GcMe GetMe()
 {
     return(_meClient.GetSingle("me").Data);
 }
Exemplo n.º 6
0
        /* 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);
        }
Exemplo n.º 7
0
        /* 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);
        }
Exemplo n.º 8
0
        /* 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);
        }