Due to a cash register implementation. Begin by writing a test that asserts the cash register prints something to the printer. Do not use a mocking framework like mockito.
Assert that the printer prints exactly a test string you provide in the test.
Replace your hand crafted mocks and stubs with a mocking framework.
- ** Write test one by one after clearly understanding the implemented code**
- ** Complete tests in the existing test file CashRegisterTest
- Unit testing should cover all core business logic
- ** Submit code in small steps with a comment on meaning **
- Complete unit tests on the corresponding file under the src/test catalog of project
- Java 8
- Intellj IDEA
- Mockito
- Gradle
- You can fork the following github repository as starting point
- Please submit your own github repository address in the answer field.
- Implement
./gradlew clean test
under root catalogue and view test result
- You should implement the test code and push your repo to github repo named unit-test-mock-basic.
- Commit your repostory link to complete this Question.