Commit 0e4a9564 authored by Colin DAMON's avatar Colin DAMON
Browse files

Convert six

parent 6d740464
...@@ -3,6 +3,10 @@ package fr.ippon.kata.numeral; ...@@ -3,6 +3,10 @@ package fr.ippon.kata.numeral;
public class Numerals { public class Numerals {
public static String toRoman(int arabic) { public static String toRoman(int arabic) {
if (arabic == 6) {
return "VI";
}
if (arabic == 5) { if (arabic == 5) {
return "V"; return "V";
} }
......
...@@ -30,4 +30,9 @@ class NumeralsTest { ...@@ -30,4 +30,9 @@ class NumeralsTest {
void shouldConvertFiveToV() { void shouldConvertFiveToV() {
assertThat(Numerals.toRoman(5)).isEqualTo("V"); assertThat(Numerals.toRoman(5)).isEqualTo("V");
} }
@Test
void shouldConvertSixToVI() {
assertThat(Numerals.toRoman(6)).isEqualTo("VI");
}
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment