Exemplo n.º 1
0
class CatFinderFunctions(TestCase):
    def setUp(self):
        self.cat_finder = CatFinder(0)

    def test_initialise_cats(self):
        self.cat_finder.initialise_cats(2)
        self.assertEquals(self.cat_finder.lost_cats[1].number, 1)
Exemplo n.º 2
0
class CatFinderFoundCatTest(TestCase):
    def setUp(self):
        self.cat_finder = CatFinder(5)
        self.cat_finder.cat_found(self.cat_finder.lost_cats[0])

    def test_station_closed(self):
        self.assertFalse(self.cat_finder.found_cats[0].current_station.opened)

    def test_number_of_lost_cats(self):
        self.assertEqual(len(self.cat_finder.lost_cats), 4)

    def test_number_of_found_cats(self):
        self.assertEqual(len(self.cat_finder.found_cats), 1)
Exemplo n.º 3
0
 def setUp(self):
     self.cat_finder = CatFinder(0)
Exemplo n.º 4
0
 def setUp(self):
     self.cat_finder = CatFinder(5)
     self.cat_finder.cat_found(self.cat_finder.lost_cats[0])