From 66a2ac35c8b9f986da35cba997c0b752d5670fa1 Mon Sep 17 00:00:00 2001 From: Gustavo Martin Morcuende Date: Sun, 4 Dec 2016 15:46:11 +0100 Subject: [PATCH] First acceptance test Use interfaces for representing the external world. --- .../craftedsw/feature/PrintStatementFeature.java | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 TDD/sandromancuso/bank/src/test/java/org/craftedsw/feature/PrintStatementFeature.java diff --git a/TDD/sandromancuso/bank/src/test/java/org/craftedsw/feature/PrintStatementFeature.java b/TDD/sandromancuso/bank/src/test/java/org/craftedsw/feature/PrintStatementFeature.java new file mode 100644 index 0000000..0af35e2 --- /dev/null +++ b/TDD/sandromancuso/bank/src/test/java/org/craftedsw/feature/PrintStatementFeature.java @@ -0,0 +1,21 @@ +package org.craftedsw.feature; + +import static org.junit.Assert.*; + +import org.junit.Test; + +public class PrintStatementFeature { + + @Test public void + print_statement_containing_all_transactions() { + + + // console will be some kind of interface that will represent my class console + // (always using interfaces for external stuff, like databases, etc, etc) + verify(console).printLine("DATE | AMOUNT | BALANCE"); + verify(console).printLine("10 / 04 / 2014 | 500.00 | 1400.00"); + verify(console).printLine("02 / 04 / 2014 | -100.00 | 900.00"); + verify(console).printLine("01 / 04 / 2014 | 1000.00 | 1000.00"); + } + +} -- 2.1.4