projects
/
JavaForFun
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c9ec4eb
)
We always write the simplest thing to make our test green
author
Gustavo Martin Morcuende
<gu.martinm@gmail.com>
Sun, 27 Nov 2016 16:25:09 +0000
(17:25 +0100)
committer
Gustavo Martin Morcuende
<gu.martinm@gmail.com>
Sun, 27 Nov 2016 16:25:09 +0000
(17:25 +0100)
TDD/sandromancuso/romannumerals/src/main/java/org/craftedsw/romannumerals/RomanNumeralGenerator.java
patch
|
blob
|
history
TDD/sandromancuso/romannumerals/src/test/java/org/craftedsw/romannumerals/RomanNumeralsGeneratorShould.java
patch
|
blob
|
history
diff --git
a/TDD/sandromancuso/romannumerals/src/main/java/org/craftedsw/romannumerals/RomanNumeralGenerator.java
b/TDD/sandromancuso/romannumerals/src/main/java/org/craftedsw/romannumerals/RomanNumeralGenerator.java
index
2a53cd3
..
8ead555
100644
(file)
--- a/
TDD/sandromancuso/romannumerals/src/main/java/org/craftedsw/romannumerals/RomanNumeralGenerator.java
+++ b/
TDD/sandromancuso/romannumerals/src/main/java/org/craftedsw/romannumerals/RomanNumeralGenerator.java
@@
-3,6
+3,9
@@
package org.craftedsw.romannumerals;
public class RomanNumeralGenerator {
public static String romanFor(int decimal) {
+ if (decimal == 2) {
+ return "II";
+ }
return "I";
}
diff --git
a/TDD/sandromancuso/romannumerals/src/test/java/org/craftedsw/romannumerals/RomanNumeralsGeneratorShould.java
b/TDD/sandromancuso/romannumerals/src/test/java/org/craftedsw/romannumerals/RomanNumeralsGeneratorShould.java
index
3563734
..
cff8122
100644
(file)
--- a/
TDD/sandromancuso/romannumerals/src/test/java/org/craftedsw/romannumerals/RomanNumeralsGeneratorShould.java
+++ b/
TDD/sandromancuso/romannumerals/src/test/java/org/craftedsw/romannumerals/RomanNumeralsGeneratorShould.java
@@
-16,6
+16,7
@@
public class RomanNumeralsGeneratorShould {
// You must always start from the assert!!!
// Method's name must describe what the assert is doing!!!
assertThat(romanFor(1), is("I"));
+ assertThat(romanFor(2), is("II"));
}
}