First acceptance test
authorGustavo Martin Morcuende <gu.martinm@gmail.com>
Sun, 4 Dec 2016 14:46:11 +0000 (15:46 +0100)
committerGustavo Martin Morcuende <gu.martinm@gmail.com>
Sun, 4 Dec 2016 22:29:14 +0000 (23:29 +0100)
Use interfaces for representing the external world.

TDD/sandromancuso/bank/src/test/java/org/craftedsw/feature/PrintStatementFeature.java [new file with mode: 0644]

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 (file)
index 0000000..0af35e2
--- /dev/null
@@ -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");
+       }
+
+}