def test_acquire_hut(self):
        """Unit test to ensure that when hut is 'acquired'

        The test asserts if the hut.occupant is updated to the Knight instance.
        """
        print("\nCalling test_wargame.test_acquire_hut..")
        hut = Hut(4, None)
        hut.acquire(self.knight)
        self.assertIs(hut.occupant, self.knight)
Exemple #2
0
    def test_acquire_hut(self):
        """Unittest to verify the hut occupant after it is acquired.

        Unit test ensure that when hut is 'acquired', the `hut.occupant` the
        `hut.occupant` is updated to the `Knight` instance.
        """
        hut = Hut(4, None)
        hut.acquire(self.knight)
        self.assertIs(hut.occupant, self.knight)
Exemple #3
0
    def test_acquire_hut(self):
        """Unittest to verify hut occupant after it is acquired

        Unit test to ensure that when hut is 'acquired', the
        `hut.occupant` is updated to the `Knight` instance.
        """
        print("\nCalling test_hut.test_acquire_hut..")
        hut = Hut(4, None)
        hut.acquire(self.knight)
        self.assertIs(hut.occupant, self.knight)
    def test_acquire_hut(self):
        """
        Unittest to veryfie hut occupant after it is acquired

        Unit test to ensure that when hut is acquired, the
        hut.occupant is updated to the Knight instance
        """
        print("\n Calling test_hut.test_acquire_hut")
        hut = Hut(4, None)
        hut.acquire(self.knight)
        self.assertIs(hut.occupant, self.knight)
Exemple #5
0
    def test_acquired_hut(self):
        """Jedinični test za provjeru okupanta kućice nakon što je osvojena.

        Jedinični test koji osigurava da u slučaju kada je kućica `acquired`, instanca `htu.occupant`
        jest instanca od `Knight`
        """

        print('\nPozivamo test za kućicu ...')
        hut = Hut(4, None)
        hut.acquire(self.knight)
        self.assertIs(hut.occupant, self.knight)
Exemple #6
0
 def test_acquire_hut(self):
     """Unittest to veryfy hut occupation after it is acquired"""
     print("\n Calling test_hut.test_acquire_hut..")
     hut = Hut(4, None)
     hut.acquire(self.knight)
     self.assertIs(hut.occupant, self.knight)
Exemple #7
0
 def test_acquire_hut(self):
     """ unit test to verify the hut occupant after it is acquired """
     # verify that when hut is acquired by a Knight, the 'hut.occupant' is updated to the Knight instance.
     hut = Hut(2, None)
     hut.acquire(self.knight)
     self.assertIs(self.knight, hut.occupant)