Esempio n. 1
0
        public void ProjectsTest()
        {
            thinkproject.RestClient c = new thinkproject.RestClient(Properties.Settings.Default.BaseUri, Properties.Settings.Default.AppKey);
            c.Authenticate(Properties.Settings.Default.Username, Properties.Settings.Default.Password);
            var p = thinkproject.Project.GetProjects(c);

            Assert.IsNotNull(p);
        }
Esempio n. 2
0
        public void DFDTest()
        {
            thinkproject.RestClient c = new thinkproject.RestClient(Properties.Settings.Default.BaseUri, Properties.Settings.Default.AppKey);
            c.Authenticate(Properties.Settings.Default.Username, Properties.Settings.Default.Password);
            var p   = thinkproject.Project.GetProjects(c);
            var dfd = thinkproject.DocumentFormDefinition.GetDocumentFormDefinitions(p[0], c);

            Assert.IsNotNull(dfd);
        }
Esempio n. 3
0
        public void DocumentTest()
        {
            thinkproject.RestClient c = new thinkproject.RestClient(Properties.Settings.Default.BaseUri, Properties.Settings.Default.AppKey);
            c.Authenticate(Properties.Settings.Default.Username, Properties.Settings.Default.Password);
            var p    = thinkproject.Project.GetProjects(c);
            var dfd  = thinkproject.Filter.GetFilters(p[0], c);
            var docs = thinkproject.Document.GetDocuments(dfd[6], c);

            Assert.IsNotNull(docs);
        }
Esempio n. 4
0
 public static bool Connect(string appKey, string baseUri, string username, string password)
 {
     try
     {
         Connection = new thinkproject.RestClient(baseUri, appKey);
         Connection.Authenticate(username, password);
         return(Connection.IsAuthenticated);
     }
     catch (Exception e) { return(false); }
 }
Esempio n. 5
0
 public void AuthTest()
 {
     thinkproject.RestClient c = new thinkproject.RestClient(Properties.Settings.Default.BaseUri, Properties.Settings.Default.AppKey);
     c.Authenticate(Properties.Settings.Default.Username, Properties.Settings.Default.Password);
     Assert.IsTrue(c.IsAuthenticated);
 }