This project focuses on implementing and testing various functionalities using JUnit.
In this project Maven has been used to create and use the necessary dependencies.
The language used was Java (jdk23).
It has been carried out in the IntelliJ IDE
Create a Java class to manage a collection of books in a library. The class should allow the following operations:
- Add books to the collection.
- Retrieve the complete list of books.
- Get the title of a book by its position.
- Insert a book at a specific position.
- Remove a book by title.
- Verify that the book list is not null after creating a new object.
- Ensure the list has the expected size after adding multiple books.
- Confirm that a specific book is in the correct position.
- Ensure that there are no duplicate book titles in the list.
- Check that a book title can be retrieved by its specific position.
- Verify that adding a book correctly modifies the list.
- Confirm that removing a book decreases the list size.
- Ensure that the list remains sorted alphabetically after adding or removing a book.
Create a class named CalculoDni that calculates the letter of a Spanish DNI (National Identification Number) based on its number.
- Implement a JUnit test class that validates its functionality.
- Parameterize the test to receive a broad range of data.
- Validate the correct letter calculation for 10 predefined DNI numbers.
Create a class with a method that throws an ArrayIndexOutOfBoundsException.
- Verify its correct handling with a JUnit test.
- Code must be written in English.
- Ensure all tests follow best practices.
- Use meaningful assertions to validate expected behavior.
-
You can use GitHub CLI
-
You can use URL
- Learn and practice about Testing.
- Apply best practices in the development and management of GitHub repositories.