This project implements a String Calculator (Add) using Test-Driven Development (TDD) principles.
- Programming Language: Java 8
- Build Tool: Maven
- Testing: JUnit 5
- Version Control: Git
The String Calculator processes strings of numbers with various delimiters and calculates their sum. It includes features for custom delimiters, negative number handling, and comprehensive testing.
- Custom delimiters
- Default delimiters (comma and newline)
- Negative number validation with detailed error messages
- Full unit test coverage
-
Clone the repository:
git clone https://github.com/HNLad/tdd-code.git
-
Navigate to the project directory: cd tdd-code
-
Compile the code: mvn clean compile
-
Run tests: mvn test
For detailed usage and examples, see the StringCalculator class in the src/main/java directory.
Unit tests are provided using JUnit. You can run them with: mvn test
For specific test cases and examples, refer to the src/test/java directory.
Feel free to submit pull requests or open issues on the GitHub repository.
For questions, contact: LinkedIn: https://www.linkedin.com/in/hanumantlad/