if: - It talks to a database - It communicates across the network - It touches the file system - You have to do things to your environment to run it (eg, change config files, comment line) - Tests that do this are integration tests.
test for the application service behavior. 2. Write the application service code. 3. See the test fail. 4. Write failing microtest for domain model (core) code and see the test fail. 5. Write/design domain model code that makes the microtest pass. 6. At some point the same microtest exercise is needed to write contract tests for ports/interfaces adapters implementations . 7. Repeat 4 to 6 until the acceptance test pass.
domain model and infrastructure based on the acceptance criteria - Microtests exercise the domain model. - Contract tests exercise infrastructure ports & adapters implementations.
cart adds fried chicken, the output should say 1 fried chicken - A cart with fried chicken, it adds another fried chicken, the output should say there’s 2 fried chicken