From: Gustavo Martin Morcuende Date: Sun, 27 Nov 2016 16:15:56 +0000 (+0100) Subject: RomanNumeralGenerator, creating test (first) and class (second) X-Git-Url: https://git.gumartinm.name/?a=commitdiff_plain;h=10e3d168be1f793488c4d0c3f498524229f0486b;p=JavaForFun RomanNumeralGenerator, creating test (first) and class (second) --- 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 new file mode 100644 index 0000000..cfb0c61 --- /dev/null +++ b/TDD/sandromancuso/romannumerals/src/main/java/org/craftedsw/romannumerals/RomanNumeralGenerator.java @@ -0,0 +1,9 @@ +package org.craftedsw.romannumerals; + +public class RomanNumeralGenerator { + + public static String romanFor(int decimal) { + return null; + } + +} 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 new file mode 100644 index 0000000..3563734 --- /dev/null +++ b/TDD/sandromancuso/romannumerals/src/test/java/org/craftedsw/romannumerals/RomanNumeralsGeneratorShould.java @@ -0,0 +1,21 @@ +package org.craftedsw.romannumerals; + +import static org.craftedsw.romannumerals.RomanNumeralGenerator.romanFor; +import static org.hamcrest.core.Is.is; +import static org.junit.Assert.assertThat; + +import org.junit.Test; + +public class RomanNumeralsGeneratorShould { + + @Test public void + generate_roman_numeral_for_a_given_decimal_number() { + + + + // You must always start from the assert!!! + // Method's name must describe what the assert is doing!!! + assertThat(romanFor(1), is("I")); + } + +}