def test_summaryAndDescriptionValidForItemWhenSeededWithExistingValidStorySummaryAndDescription(self):
     story = Story()
     description = "Hello World"
     summary = "HW"
     story.description = description
     story.name = summary
     item = PivotalTrackerItem(story)
     self.assertEqual(item.summary(), summary)
     self.assertEqual(item.description(), description)
 def test_canAddStoryToPivotal(self):
     tracker = self.pivotal_
     name = "test_canAddStoryToPivotal"
     description = "this is a test"
     item = PivotalTrackerItem(Story()).withSummary(name).withDescription(description)
     tracker.update(item)
     item = next(tracker.items())
     self.assertEqual(item.summary(), name)
     self.assertEqual(item.description(), description)
 def test_itemConstructedWithDecoratedStoryWithJiraKeyGetsValidSummary(self):
     story = Story()
     jiraKey = "TEST-pti1234"
     summary = "summary"
     decoratedSummary = "[TEST-pti1234]: summary"
     story.SetName(decoratedSummary)
     item = PivotalTrackerItem(story)
     self.assertEqual(item.summary(), summary)
     self.assertEqual(item.jiraKey(), jiraKey)
 def test_canAddStoryToPivotal(self):
     tracker = self.pivotal_
     name = "test_canAddStoryToPivotal"
     description = "this is a test"
     item = PivotalTrackerItem(
         Story()).withSummary(name).withDescription(description)
     tracker.update(item)
     item = next(tracker.items())
     self.assertEqual(item.summary(), name)
     self.assertEqual(item.description(), description)
Exemplo n.º 5
0
 def test_summaryAndDescriptionValidForItemWhenSeededWithExistingValidStorySummaryAndDescription(
         self):
     story = Story()
     description = "Hello World"
     summary = "HW"
     story.description = description
     story.name = summary
     item = PivotalTrackerItem(story)
     self.assertEqual(item.summary(), summary)
     self.assertEqual(item.description(), description)
Exemplo n.º 6
0
 def test_itemConstructedWithDecoratedStoryWithJiraKeyGetsValidSummary(
         self):
     story = Story()
     jiraKey = "TEST-pti1234"
     summary = "summary"
     decoratedSummary = "[TEST-pti1234]: summary"
     story.SetName(decoratedSummary)
     item = PivotalTrackerItem(story)
     self.assertEqual(item.summary(), summary)
     self.assertEqual(item.jiraKey(), jiraKey)
 def test_canUpdateItemAlreadyInPivotal(self):
     tracker = self.pivotal_
     item = PivotalTrackerItem().withSummary("test_canUpdateItemAlreadyInPivotal-to update").withDescription("can update?")
     tracker.update(item)
     item = next(tracker.items())
     newSummary = "test_canUpdateItemAlreadyInPivotal-1"
     newDescription = "yep - updated"
     item.withSummary(newSummary).withDescription(newDescription)
     tracker.update(item)
     item = next(tracker.items())
     self.assertEqual(item.summary(), newSummary)
     self.assertEqual(item.description(), newDescription)
 def test_canUpdateItemAlreadyInPivotal(self):
     tracker = self.pivotal_
     item = PivotalTrackerItem().withSummary(
         "test_canUpdateItemAlreadyInPivotal-to update").withDescription(
             "can update?")
     tracker.update(item)
     item = next(tracker.items())
     newSummary = "test_canUpdateItemAlreadyInPivotal-1"
     newDescription = "yep - updated"
     item.withSummary(newSummary).withDescription(newDescription)
     tracker.update(item)
     item = next(tracker.items())
     self.assertEqual(item.summary(), newSummary)
     self.assertEqual(item.description(), newDescription)