Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
singleDigitsTests
public class RomanNumeralsTest {
@Test
public void convert_shouldReturnI() {
final String romanNumeral = RomanNumerals.convert(1);
assertThat(romanNumeral, is("I"));
}
@Test
public void convert_shouldReturnV() {
final String romanNumeral = RomanNumerals.convert(5);
assertThat(romanNumeral, is("V"));
}
@Test
public void convert_shouldReturnX() {
final String romanNumeral = RomanNumerals.convert(10);
assertThat(romanNumeral, is("X"));
}
@Test
public void convert_shouldReturnL() {
final String romanNumeral = RomanNumerals.convert(50);
assertThat(romanNumeral, is("L"));
}
@Test
public void convert_shouldReturnC() {
final String romanNumeral = RomanNumerals.convert(100);
assertThat(romanNumeral, is("C"));
}
@Test
public void convert_shouldReturnD() {
final String romanNumeral = RomanNumerals.convert(500);
assertThat(romanNumeral, is("D"));
}
@Test
public void convert_shouldReturnM() {
final String romanNumeral = RomanNumerals.convert(1000);
assertThat(romanNumeral, is("M"));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment