Exemple #1
0
        public void GetAllObjectsTest()
        {
            var allDataObject = _serviceObject.GetAll($"projects?account_id={_configData.AccountId}");

            Assert.IsNotNull(allDataObject);
            CollectionAssert.AllItemsAreUnique(allDataObject.Data.ToList());
            CollectionAssert.AllItemsAreNotNull(allDataObject.Data.ToList());
        }
Exemple #2
0
        public void GetAllObjects_InvalidCredential()
        {
            _serviceObject = new GcDataRepository <GcProject>("123", _configData.Email);
            var allDataObject = _serviceObject.GetAll("projects");

            Assert.IsNotNull(allDataObject);
            Assert.AreEqual(allDataObject.Data, null);
        }
Exemple #3
0
 public ICollection <GcAccount> GetAccounts()
 {
     return(_accountClient.GetAll("accounts").Data);
 }
Exemple #4
0
        public ICollection <GcTemplate> GetTemplatesByProjectId(string projectId)
        {
            var urlPath = $"templates?project_id={projectId}";

            return(_templateClient.GetAll(urlPath).Data);
        }
Exemple #5
0
        /* Get methods for Items end. */

        /* Get method for Files of Items starts. */

        public ICollection <GcFile> GetFilesByItemId(int itemId)
        {
            var urlPath = $"items/{itemId}/files/";

            return(_fileClient.GetAll(urlPath).Data);
        }
Exemple #6
0
        public ICollection <GcItem> GetItemsByProjectId(int projectId)
        {
            var urlPath = $"items?project_id={projectId}";

            return(_itemClient.GetAll(urlPath).Data);
        }
Exemple #7
0
        public ICollection <GcStatus> GetStatusesByProjectId(int projectId)
        {
            var urlPath = $"projects/{projectId}/statuses";

            return(_statusClient.GetAll(urlPath).Data);
        }
Exemple #8
0
        public ICollection <GcProject> GetProjectsByAccountId(int accountId)
        {
            var urlPath = $"projects?account_id={accountId}";

            return(_projectClient.GetAll(urlPath).Data);
        }