public void Get() { var srv = new ProjectService(); var obj = srv.List(); Assert.GreaterOrEqual(obj.Count(), 0); }
public TogglClient(string APIToken) { _APIToken = APIToken; WorkspaceService = new WorkspaceService(_APIToken); ProjectService = new ProjectService(_APIToken); TimeEntryService = new TimeEntryService(_APIToken); TaskService = new TaskService(_APIToken); ApiService = new ApiService(_APIToken); ClientService = new ClientService(_APIToken); }
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); }
public void Add() { var srv = new ProjectService(); var obj = new Project { IsBillable = true, WorkspaceId = 303523 , Name = "New Project" + DateTime.UtcNow, IsAutoEstimates = false }; var act = srv.Add(obj); Assert.NotNull(act,"response back from api does not have at project object"); Assert.GreaterOrEqual(act.Id, 0, "response back from object does not have a project id greater than zero"); }
public void AddTest() { var srv = new ProjectService(); var obj = new Project { Billable = true, Workspace = new Workspace { Id = 303523 }, Name = "New Project" + DateTime.UtcNow, AutomaticallyCalculateEstimatedWorkhours = false }; var act = srv.Add(obj); Assert.NotNull(act,"response back from api does not have at project object"); Assert.GreaterOrEqual(act.Id, 0, "response back from object does not have a project id greater than zero"); }