Exemplo n.º 1
0
    def test_remove_when_single_element_in_myarray(self):
        # Arrange
        myarray = MyArray('i', 20)

        # Act
        myarray.remove(20)

        # Assert
        self.assertEqual(0, myarray.size())
Exemplo n.º 2
0
    def test_remove_when_more_than_one_element_in_myarray(self):
        # Arrange
        myarray = MyArray('i', 20, 30)

        # Act
        myarray.remove(20)

        # Assert
        self.assertEqual(1, myarray.size())
        self.assertEqual(30, myarray.get(0))