Exemplo n.º 1
0
 def test_compare_apple_and_oranges(self):
     activity = AggregatedActivity(1, [Activity(1, LoveVerb, Pin(id=1))])
     with self.assertRaises(ValueError):
         activity == Pin(id=1)
Exemplo n.º 2
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))
Exemplo n.º 3
0
 def test_duplicated_activities(self):
     activity = Activity(1, LoveVerb, Pin(id=1))
     aggregated = AggregatedActivity(1, [activity])
     with self.assertRaises(DuplicateActivityException):
         aggregated.append(activity)
Exemplo n.º 4
0
 def test_contains(self):
     activity = Activity(1, LoveVerb, Pin(id=1))
     aggregated = AggregatedActivity(1, [activity])
     self.assertTrue(aggregated.contains(activity))
Exemplo n.º 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))
Exemplo n.º 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)
Exemplo n.º 7
0
 def test_contains(self):
     activity = Activity(1, LoveVerb, Pin(id=1))
     aggregated = AggregatedActivity(1, [activity])
     self.assertTrue(aggregated.contains(activity))