Example #1
0
        public void SanityTestToRoman(TestData data)
        {
            var result1 = Roman.FromRoman(data.Romans);
            var result2 = Roman.ToRoman(result1);

            Assert.AreEqual(result2, data.Romans);
        }
Example #2
0
        public void ShouldBeUpperCaseAndParityTest(string lower, string upper)
        {
            var result1 = Roman.FromRoman(lower);
            var result2 = Roman.ToRoman(result1);

            Assert.AreEqual(result2, upper);
        }
Example #3
0
 public void WrongFromRomanFormat()
 {
     Assert.Throws <ArgumentException>(() => Roman.FromRoman("HHFDH"));
 }
Example #4
0
        public void ShouldConvertNumberFromRoman(TestData data)
        {
            var result = Roman.FromRoman(data.Romans);

            Assert.AreEqual(data.Numbers, result);
        }
Example #5
0
 public void TestTooManyRepeatedNumerals(string roman)
 {
     Assert.Throws <ArgumentException>(() => Roman.FromRoman(roman));
 }
Example #6
0
 public void NullFromRomanFormat()
 {
     Assert.Throws <ArgumentException>(() => Roman.FromRoman(""));
 }