Example #1
0
 public void ConvertShouldUseSubstractionRules()
 {
     ArabicToRoman.Convert(4).Should().Be("IV");
     ArabicToRoman.Convert(9).Should().Be("IX");
     ArabicToRoman.Convert(40).Should().Be("XL");
     ArabicToRoman.Convert(90).Should().Be("XC");
     ArabicToRoman.Convert(400).Should().Be("CD");
     ArabicToRoman.Convert(900).Should().Be("CM");
 }
Example #2
0
 public void ConvertTests(int arabic, string roman)
 {
     Assert.That(ArabicToRoman.Convert(arabic), Is.EqualTo(roman));
 }
Example #3
0
 public void ConvertShouldUseSubstractionRules(int input, string expected)
 {
     ArabicToRoman.Convert(input).Should().Be(expected);
 }
Example #4
0
 public void ConvertShouldReturnMs(int input, string expected)
 {
     ArabicToRoman.Convert(input).Should().Be(expected);
 }
Example #5
0
 public void ConvertShouldReturnLs(int input, string expected)
 {
     ArabicToRoman.Convert(50).Should().Be("L");
     ArabicToRoman.Convert(67).Should().Be("LXVII");
 }
Example #6
0
 public void ConvertShouldReturnIs()
 {
     ArabicToRoman.Convert(1).Should().Be("I");
     ArabicToRoman.Convert(2).Should().Be("II");
     ArabicToRoman.Convert(3).Should().Be("III");
 }
Example #7
0
 public void ConvertShouldReturnMs()
 {
     ArabicToRoman.Convert(1000).Should().Be("M");
     ArabicToRoman.Convert(1984).Should().Be("MCMLXXXIV");
 }
Example #8
0
 public void ConvertShouldReturnDs()
 {
     ArabicToRoman.Convert(500).Should().Be("D");
     ArabicToRoman.Convert(751).Should().Be("DCCLI");
 }
Example #9
0
 public void ConvertShouldReturnCs()
 {
     ArabicToRoman.Convert(100).Should().Be("C");
     ArabicToRoman.Convert(283).Should().Be("CCLXXXIII");
 }
Example #10
0
 public void ConvertShouldReturnLs()
 {
     ArabicToRoman.Convert(50).Should().Be("L");
     ArabicToRoman.Convert(67).Should().Be("LXVII");
 }
Example #11
0
 public void ConvertShouldReturnXs()
 {
     ArabicToRoman.Convert(10).Should().Be("X");
     ArabicToRoman.Convert(12).Should().Be("XII");
     ArabicToRoman.Convert(16).Should().Be("XVI");
 }
Example #12
0
 public void ConvertShouldReturnVs()
 {
     ArabicToRoman.Convert(5).Should().Be("V");
     ArabicToRoman.Convert(7).Should().Be("VII");
 }