Exemplo n.º 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());
        }
Exemplo n.º 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);
        }
Exemplo n.º 3
0
 public ICollection <GcAccount> GetAccounts()
 {
     return(_accountClient.GetAll("accounts").Data);
 }
Exemplo n.º 4
0
        public ICollection <GcTemplate> GetTemplatesByProjectId(string projectId)
        {
            var urlPath = $"templates?project_id={projectId}";

            return(_templateClient.GetAll(urlPath).Data);
        }
Exemplo n.º 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);
        }
Exemplo n.º 6
0
        public ICollection <GcItem> GetItemsByProjectId(int projectId)
        {
            var urlPath = $"items?project_id={projectId}";

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

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

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