def test_set_when_more_than_one_element_in_myarray(self): # Arrange myarray = MyArray('i', 100, 200) # Act myarray.set(1, 300) # Assert self.assertEqual(300, myarray.get(1))
def test_set_when_single_element_in_myarray(self): # Arrange myarray = MyArray('i', 100) # Act myarray.set(0, 200) # Assert self.assertEqual(200, myarray.get(0))