Example #1
0
        public void OutputEquals102IfInputEqualsCII()
        {
            var converter = new ArabicNumberConverter();

            Assert.AreEqual(102, converter.ConvertNumber("CII"));
        }
Example #2
0
        public void OutputEquals55IfInputEqualsLV()
        {
            var converter = new ArabicNumberConverter();

            Assert.AreEqual(55, converter.ConvertNumber("LV"));
        }
Example #3
0
        public void OutputEquals511IfInputEqualsDXI()
        {
            var converter = new ArabicNumberConverter();

            Assert.AreEqual(511, converter.ConvertNumber("DXI"));
        }
Example #4
0
        public void OutputEquals900IfInputEqualsCM()
        {
            var converter = new ArabicNumberConverter();

            Assert.AreEqual(900, converter.ConvertNumber("CM"));
        }
Example #5
0
        public void OutputEquals3000IfInputEqualsMMM()
        {
            var converter = new ArabicNumberConverter();

            Assert.AreEqual(3000, converter.ConvertNumber("MMM"));
        }
Example #6
0
        public void OutputEquals40IfInputEqualsXL()
        {
            var converter = new ArabicNumberConverter();

            Assert.AreEqual(40, converter.ConvertNumber("XL"));
        }
Example #7
0
        public void OutputEquals500IfInputEqualsD()
        {
            var converter = new ArabicNumberConverter();

            Assert.AreEqual(500, converter.ConvertNumber("D"));
        }
Example #8
0
        public void OutputEquals10IfInputEqualsX()
        {
            var converter = new ArabicNumberConverter();

            Assert.AreEqual(10, converter.ConvertNumber("X"));
        }
Example #9
0
        public void OutputEquals9IfInputEqualsIX()
        {
            var converter = new ArabicNumberConverter();

            Assert.AreEqual(9, converter.ConvertNumber("IX"));
        }
Example #10
0
        public void OutputEquals4IfInputEqualsIV()
        {
            var converter = new ArabicNumberConverter();

            Assert.AreEqual(4, converter.ConvertNumber("IV"));
        }
Example #11
0
        public void OutputEquals1IfInputEqualsI()
        {
            var converter = new ArabicNumberConverter();

            Assert.AreEqual(1, converter.ConvertNumber("I"));
        }
Example #12
0
        public void ThrowIndexOutOfRangeWhenInputNotIVXLCDM()
        {
            var converter = new ArabicNumberConverter();

            Assert.ThrowsException <IndexOutOfRangeException>(() => converter.ConvertNumber("W"));
        }