From 10e3d168be1f793488c4d0c3f498524229f0486b Mon Sep 17 00:00:00 2001 From: Gustavo Martin Morcuende Date: Sun, 27 Nov 2016 17:15:56 +0100 Subject: [PATCH] RomanNumeralGenerator, creating test (first) and class (second) --- .../romannumerals/RomanNumeralGenerator.java | 9 +++++++++ .../romannumerals/RomanNumeralsGeneratorShould.java | 21 +++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 TDD/sandromancuso/romannumerals/src/main/java/org/craftedsw/romannumerals/RomanNumeralGenerator.java create mode 100644 TDD/sandromancuso/romannumerals/src/test/java/org/craftedsw/romannumerals/RomanNumeralsGeneratorShould.java 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")); + } + +} -- 2.1.4