-
Notifications
You must be signed in to change notification settings - Fork 0
/
ArabicNumeralTests.cs
42 lines (38 loc) · 1.42 KB
/
ArabicNumeralTests.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using NUnit.Framework;
namespace KataRomanNumerals
{
class ArabicNumeralTests
{
[TestCase("I", 1)]
[TestCase("II", 2)]
[TestCase("III", 3)]
public void Should_return_an_arabic_numeral_when_the_imput_roman_numeral_in_arabic_is_inferior_IV(string romanNumber, int expected)
{
int actual = new ArabicNumeral().ToArabic(romanNumber);
Assert.AreEqual(expected, actual);
}
[TestCase("IV", 4)]
[TestCase("VI", 6)]
[TestCase("VII", 7)]
[TestCase("VIII", 8)]
[TestCase("IX", 9)]
[TestCase("X", 10)]
[TestCase("XI", 11)]
[TestCase("XXI", 21)]
[TestCase("XXXV", 35)]
[TestCase("DII", 502)]
public void Should_return_an_arabic_numeral_when_the_imput_roman_numeral_in_arabic_is_inferior_MIII(string romanNumber, int expected)
{
int actual = new ArabicNumeral().ToArabic(romanNumber);
Assert.AreEqual(expected, actual);
}
[TestCase("MIII", 1003)]
[TestCase("MCMXC", 1990)]
[TestCase("MCMIII", 1903)]
public void Should_return_an_arabic_numeral_when_the_imput_roman_numeral_in_arabic_is_equal_or_greater_than_MIII(string romanNumber, int expected)
{
int actual = new ArabicNumeral().ToArabic(romanNumber);
Assert.AreEqual(expected, actual);
}
}
}