This repository uses JUnit 4 to test the Calculator.jar, which is created by using IntelliJ. The video tutorials of creating a Java Calculator are here:
The default jar file will fail all the tests. You need to upload your own Caculator.jar to pass all the tests!
Clone this repository, copy your Caculator.jar to the folder, and run the following commands:
javac -cp ".;junit-4.13.1.jar;Calculator.jar" CalculatorFormTest.java
java -cp ".;junit-4.13.1.jar;Calculator.jar;hamcrest-core-1.3.jar" CalculatorFormTest
javac -cp ".:./junit-4.13.1.jar:./Calculator.jar" CalculatorFormTest.java
java -cp ".:./junit-4.13.1.jar:./Calculator.jar:./hamcrest-core-1.3.jar" CalculatorFormTest
The test program will print true if your Caculator.jar pass all the tests!