示例#1
0
 def test_returns_next_area(self) -> None:
     first_area = AreaFactory.create()
     last_area = AreaFactory.create()
     circle = Circle(
         first_area,
         last_area,
     )
     self.assertEqual(circle.next(first_area.id), last_area)
示例#2
0
 def test_next_raises_unknown_area_error_if_area_not_within_cicle(
         self) -> None:
     circle = Circle(AreaFactory.create(), )
     with self.assertRaises(UnknownArea):
         circle.next(AreaIdFactory.create())
示例#3
0
 def test_if_last_area_return_first_as_next(self) -> None:
     first_area = AreaFactory.create()
     last_area = AreaFactory.create()
     circle = Circle(first_area, last_area)
     self.assertEqual(circle.next(last_area.id), first_area)