示例#1
0
    def test_change_alignment_them_to_us(self):
        # Arrange
        name = 'NShip'
        type_ = 'Battle'
        align = 'them'
        x_location = 2
        y_location = 2

        # Act
        ship = Ship(name, type_, x_location, y_location, align)
        ship.change_alignment()
        print(ship._align)

        # Assert
        self.assertNotEqual(align, ship._align)
示例#2
0
    def test_change_alignment_us_to_them(self):
        # Arrange
        name = 'NShip'
        type_ = 'Battle'
        align = 'us'
        x_location = 2
        y_location = 2

        # Act
        ship = Ship(name, type_, x_location, y_location, align)
        ship.change_alignment()
        print(ship._align)

        # Assert
        self.assertNotEqual(
            align, ship._align)  # wont be equal because alignment is changed