Beispiel #1
0
        public void EditTest(int dow)
        {
			var srv = new UserService(Constants.ApiToken);
            var exp = srv.GetCurrent();
            exp.BeginningOfWeek = dow;

            var act = srv.Edit(exp);

            Assert.AreEqual(act.BeginningOfWeek, exp.BeginningOfWeek);
        }
Beispiel #2
0
 public Toggl(string key)
 {
     ApiService = new ApiService(key);
     Client = new ClientService(ApiService);
     Project = new ProjectService(ApiService);
     Tag = new TagService(ApiService);
     Task = new TaskService(ApiService);
     TimeEntry = new TimeEntryService(ApiService);
     User = new UserService(ApiService);
     Workspace = new WorkspaceService(ApiService);
 }        
Beispiel #3
0
        public void AddTest()
        {
            return;
			var srv = new UserService(Constants.ApiToken);
            var exp = new User();
            exp.Email = "john.babb" + DateTime.Now.Ticks + "@ikoios.com";
            

            var act = srv.Edit(exp);

            Assert.AreEqual(act.BeginningOfWeek, exp.BeginningOfWeek);
        }
Beispiel #4
0
        public void ResetApiToken()
        {
            var oldToken = Constants.ApiToken;
            var srv = new UserService(oldToken);

            var act = srv.ResetApiToken();
            Constants.ApiToken = act;           // Update the ApiToken, so that other tests can use the new active apiToken
            Assert.AreNotEqual(oldToken, act);
        }