def test_compare_apple_and_oranges(self):
     activity = AggregatedActivity(1, [Activity(1, LoveVerb, Pin(id=1))])
     with self.assertRaises(ValueError):
         activity == Pin(id=1)
 def test_contains_extraneous_object(self):
     activity = AggregatedActivity(1, [Activity(1, LoveVerb, Pin(id=1))])
     with self.assertRaises(ValueError):
         activity.contains(Pin(id=1))
 def test_duplicated_activities(self):
     activity = Activity(1, LoveVerb, Pin(id=1))
     aggregated = AggregatedActivity(1, [activity])
     with self.assertRaises(DuplicateActivityException):
         aggregated.append(activity)
 def test_contains(self):
     activity = Activity(1, LoveVerb, Pin(id=1))
     aggregated = AggregatedActivity(1, [activity])
     self.assertTrue(aggregated.contains(activity))
Beispiel #5
0
 def test_contains_extraneous_object(self):
     activity = AggregatedActivity(1, [Activity(1, LoveVerb, Pin(id=1))])
     with self.assertRaises(ValueError):
         activity.contains(Pin(id=1))
Beispiel #6
0
 def test_duplicated_activities(self):
     activity = Activity(1, LoveVerb, Pin(id=1))
     aggregated = AggregatedActivity(1, [activity])
     with self.assertRaises(DuplicateActivityException):
         aggregated.append(activity)
Beispiel #7
0
 def test_contains(self):
     activity = Activity(1, LoveVerb, Pin(id=1))
     aggregated = AggregatedActivity(1, [activity])
     self.assertTrue(aggregated.contains(activity))