Ejemplo n.º 1
0
        public void Test_C_for_hundred()
        {
            KataRomanNumeral testClass = new KataRomanNumeral();

            string result = testClass.ConvertToRomanNumeral(100);

            Assert.AreEqual("C", result);

            result = testClass.ConvertToRomanNumeral(200);
            Assert.AreEqual("CC", result);

            result = testClass.ConvertToRomanNumeral(1200);
            Assert.AreEqual("MCC", result);
        }
Ejemplo n.º 2
0
        public void Test_D_for_five_hundred()
        {
            KataRomanNumeral testClass = new KataRomanNumeral();

            string result = testClass.ConvertToRomanNumeral(500);

            Assert.AreEqual("D", result);

            result = testClass.ConvertToRomanNumeral(1500);
            Assert.AreEqual("MD", result);

            result = testClass.ConvertToRomanNumeral(2500);
            Assert.AreEqual("MMD", result);
        }
Ejemplo n.º 3
0
        public void Test_V_for_five()
        {
            KataRomanNumeral testClass = new KataRomanNumeral();

            string result = testClass.ConvertToRomanNumeral(5);

            Assert.AreEqual("V", result);

            result = testClass.ConvertToRomanNumeral(15);
            Assert.AreEqual("XV", result);

            result = testClass.ConvertToRomanNumeral(105);
            Assert.AreEqual("CV", result);
        }
Ejemplo n.º 4
0
        public void Test_X_for_ten()
        {
            KataRomanNumeral testClass = new KataRomanNumeral();

            string result = testClass.ConvertToRomanNumeral(10);

            Assert.AreEqual("X", result);

            result = testClass.ConvertToRomanNumeral(20);
            Assert.AreEqual("XX", result);

            result = testClass.ConvertToRomanNumeral(120);
            Assert.AreEqual("CXX", result);

            result = testClass.ConvertToRomanNumeral(1020);
            Assert.AreEqual("MXX", result);
        }
Ejemplo n.º 5
0
        public void Test_L_for_fifty()
        {
            KataRomanNumeral testClass = new KataRomanNumeral();

            string result = testClass.ConvertToRomanNumeral(50);

            Assert.AreEqual("L", result);

            result = testClass.ConvertToRomanNumeral(150);
            Assert.AreEqual("CL", result);

            result = testClass.ConvertToRomanNumeral(1050);
            Assert.AreEqual("ML", result);

            result = testClass.ConvertToRomanNumeral(1150);
            Assert.AreEqual("MCL", result);
        }
Ejemplo n.º 6
0
        public void Test_I_for_one()
        {
            KataRomanNumeral testClass = new KataRomanNumeral();

            string result = testClass.ConvertToRomanNumeral(1);

            Assert.AreEqual("I", result);

            result = testClass.ConvertToRomanNumeral(2);
            Assert.AreEqual("II", result);

            result = testClass.ConvertToRomanNumeral(3);
            Assert.AreEqual("III", result);

            result = testClass.ConvertToRomanNumeral(6);
            Assert.AreEqual("VI", result);
        }
Ejemplo n.º 7
0
        public void test_M_for_thousand()
        {
            KataRomanNumeral testClass = new KataRomanNumeral();

            string result = testClass.ConvertToRomanNumeral(1000);

            Assert.AreEqual("M", result);

            result = testClass.ConvertToRomanNumeral(2000);
            Assert.AreEqual("MM", result);

            result = testClass.ConvertToRomanNumeral(3000);
            Assert.AreEqual("MMM", result);

            result = testClass.ConvertToRomanNumeral(4000);
            Assert.AreEqual("MMMM", result);

            result = testClass.ConvertToRomanNumeral(5000);
            Assert.AreEqual("MMMMMM", result);
        }
 public void Init()
 {
     testObj = new KataRomanNumeral();
 }
Ejemplo n.º 9
0
 public void Initialize()
 {
     kata = new KataRomanNumeral();
 }