public void integration_stories_create_story() { PivotalTrackerAPIClient.Model.Entity.Project project = this.PTContext.Projects.Find(this.ProjectID); PivotalTrackerAPIClient.Model.Entity.Story story = new PivotalTrackerAPIClient.Model.Entity.Story(this.Token); story.Name = "Integration Test Story 1"; story.Description = "This is a test story to make sure the pivotal tracker API client is working."; story.Estimate = 1; story.RequestedBy = project.Memberships[0].Name; story.ProjectID = project.ID; story.Save(); story.Delete(); Assert.IsTrue(story.ID > 0); }
public void integration_stories_save_story_no_project_id() { try { List<PivotalTrackerAPIClient.Model.Entity.Project> projects = this.PTContext.Projects.GetAll(); PivotalTrackerAPIClient.Model.Entity.Story story = new PivotalTrackerAPIClient.Model.Entity.Story(); story.Token = this.Token; story.Name = "Integration Test Story 1"; story.Description = "This is a test story to make sure the pivotal tracker API client is working."; story.Estimate = 1; story.RequestedBy = "Integration Test"; story.Save(); } catch (Exception e) { Assert.AreEqual("The project ID is required to save a story.", e.Message); } }