Commit a5243148 authored by Colin DAMON's avatar Colin DAMON

Convert One

parent 0331c5c1
......@@ -3,6 +3,10 @@ package fr.ippon.kata.numeral;
public class Numerals {
public static String toRoman(int arabic) {
return "";
if (arabic == 0) {
return "";
}
return "I";
}
}
package fr.ippon.kata.numeral;
import static org.assertj.core.api.Assertions.*;
import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
......@@ -11,4 +10,9 @@ class NumeralsTest {
void shouldConvertZeroToEmptyString() {
assertThat(Numerals.toRoman(0)).isEmpty();
}
@Test
void shouldConvertOneToI() {
assertThat(Numerals.toRoman(1)).isEqualTo("I");
}
}
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