Skip to content

Add ArrayList Implementation and Comprehensive Unit Tests #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 28, 2024

Conversation

walmir-silva
Copy link
Contributor

  • Implemented the ArrayList class in the KaririCode\DataStructure\Collection namespace.
  • Added comprehensive unit tests for the ArrayList class in the KaririCode\DataStructure\Tests\Collection namespace.

Class:

  • KaririCode\DataStructure\Collection\ArrayList

Tests:

  • KaririCode\DataStructure\Tests\Collection\ArrayListTest

Implemented Features and Corresponding Tests:

  • Added method: testAddElementAddsElementToList
  • Add all elements method: testAddAllElementsAddsAllElementsFromAnotherCollection
  • Remove element method: testRemoveElementRemovesElementFromList
  • Contains element method: testContainsElementReturnsTrueIfElementExists
  • Clear elements method: testClearElementsRemovesAllElementsFromList
  • Check if list is empty method: testIsEmptyReturnsTrueIfListIsEmpty
  • Get items method: testGetItemsReturnsAllElementsInList
  • Count elements method: testCountElementsReturnsNumberOfElementsInList
  • Get element by index method: testGetElementByIndexThrowsExceptionForInvalidIndex
  • Set element by index method: testSetElementByIndexThrowsExceptionForInvalidIndex
  • Iterate over elements method: testIterationOverElementsReturnsAllElements
  • Handling different data types: testDifferentDataTypesCanBeAddedToList
  • Mass add and remove elements: testMassAddAndRemoveHandlesLargeNumberOfElements
  • Index consistency after removal: testIndexConsistencyAfterRemoval
  • Out of bounds access method: testOutOfBoundsAccessThrowsException
  • Out of bounds set method: testOutOfBoundsSetThrowsException
  • Out of bounds remove method: testOutOfBoundsRemoveReturnsFalse
  • Handling null values: testHandlingNullValuesCorrectly
  • Serialization and deserialization: testSerializationAndDeserialization
  • Cloning the list: testCloningCreatesIndependentCopy
  • List integrity after mixed operations: testListIntegrityAfterMixedOperations

- Implemented the ArrayList class in the KaririCode\DataStructure\Collection namespace.
- Added comprehensive unit tests for the ArrayList class in the KaririCode\DataStructure\Tests\Collection namespace.

Class:
- KaririCode\DataStructure\Collection\ArrayList

Tests:
- KaririCode\DataStructure\Tests\Collection\ArrayListTest

Implemented Features and Corresponding Tests:
- Added method: testAddElementAddsElementToList
- Add all elements method: testAddAllElementsAddsAllElementsFromAnotherCollection
- Remove element method: testRemoveElementRemovesElementFromList
- Contains element method: testContainsElementReturnsTrueIfElementExists
- Clear elements method: testClearElementsRemovesAllElementsFromList
- Check if list is empty method: testIsEmptyReturnsTrueIfListIsEmpty
- Get items method: testGetItemsReturnsAllElementsInList
- Count elements method: testCountElementsReturnsNumberOfElementsInList
- Get element by index method: testGetElementByIndexThrowsExceptionForInvalidIndex
- Set element by index method: testSetElementByIndexThrowsExceptionForInvalidIndex
- Iterate over elements method: testIterationOverElementsReturnsAllElements
- Handling different data types: testDifferentDataTypesCanBeAddedToList
- Mass add and remove elements: testMassAddAndRemoveHandlesLargeNumberOfElements
- Index consistency after removal: testIndexConsistencyAfterRemoval
- Out of bounds access method: testOutOfBoundsAccessThrowsException
- Out of bounds set method: testOutOfBoundsSetThrowsException
- Out of bounds remove method: testOutOfBoundsRemoveReturnsFalse
- Handling null values: testHandlingNullValuesCorrectly
- Serialization and deserialization: testSerializationAndDeserialization
- Cloning the list: testCloningCreatesIndependentCopy
- List integrity after mixed operations: testListIntegrityAfterMixedOperations
@walmir-silva walmir-silva merged commit be67b80 into main Jun 28, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant