This project demonstrates Test-Driven Development (TDD) with a simple Java application that checks if a given string is a palindrome. A palindrome is a word, phrase, number, or other sequences of characters that reads the same forward and backward (ignoring spaces, punctuation, and capitalization).
- Ensure Java and Maven are properly installed on your system.
- Navigate to the project directory in your terminal or command prompt.
- Run
mvn compile
to compile the project files. - Execute
mvn test
to run the tests using JUnit. - To use the application, run
mvn exec:java -Dexec.mainClass=PalindromeChecker
and input strings as prompted.
- Open IntelliJ IDEA and select "Get from VCS" (Version Control System).
- In the URL field, enter the repository URL: https://github.com/FUM-ComputerWorkshop/TDD and click "Clone".
- Once the project is cloned and open in IntelliJ, it may take a moment for IntelliJ to index the files.
- Click on the "Maven" tab on the right side of the IDE to access Maven projects.
- Under the "Lifecycle" section, double-click on "compile" to build the project.
- Navigate to the
src/test/java
directory, right-click on thePalindromeTest.java
file and select "Run 'PalindromeTest'" to execute the tests. - To run the application, navigate to the
src/main/java
directory, right-click on thePalindromeChecker.java
file and select "Run 'PalindromeChecker.main()'".
- Check Palindromes: Input any string to check if it's a palindrome, considering spaces, punctuation, and case.
- JUnit Tests: Comprehensive tests covering various scenarios including palindromes, non-palindromes, mixed cases, spaces, special characters, empty strings, and single characters.