A simple calculator that adds strings
What you need:
Right Click Project -> Run As -> JUnit Test
Right Click Project -> Run As -> Java Application
- Enter Input into the Spring Tool Suite Console See Below:
Please enter numbers to add: 1,2
Write JUnit Tests that will support the following requirements:
- An empty string returns zero
- A single number returns the value
- Two numbers, comma delimited, returns the sum
- Two numbers, newline delimited, returns the sum
- Three numbers, delimited either way, returns the sum
- Negative numbers throw a NegativeNumberException
- Numbers greater than 1000 are ignored