Beispiel #1
0
 public void Should_ValidateInput_Given_Input_Between1And3999()
 {
     for (int input = 1; input <= 3999; input++)
     {
         Assert.IsTrue(RomanNumerals.ValidateInput(input), String.Format("Value {0} not correctly validated", input));
     }
 }
Beispiel #2
0
 public void Should_NotValidateInput_Given_Input_GreaterThan3999()
 {
     for (int input = 4000; input <= 999999; input++)
     {
         Assert.IsFalse(RomanNumerals.ValidateInput(input), String.Format("Value {0} not correctly validated", input));
     }
 }
Beispiel #3
0
 public void Should_Return_XC_Given_Input_90()
 {
     Assert.AreEqual("XC", RomanNumerals.Convert(90));
 }
Beispiel #4
0
 public void Should_Return_L_Given_Input_50()
 {
     Assert.AreEqual("L", RomanNumerals.Convert(50));
 }
Beispiel #5
0
 public void Should_Return_XL_Given_Input_40()
 {
     Assert.AreEqual("XL", RomanNumerals.Convert(40));
 }
Beispiel #6
0
 public void Should_Return_MMMCMXCIX_Given_Input_3999()
 {
     Assert.AreEqual("MMMCMXCIX", RomanNumerals.Convert(3999));
 }
Beispiel #7
0
 public void Should_Return_V_Given_Input_5()
 {
     Assert.AreEqual("V", RomanNumerals.Convert(5));
 }
Beispiel #8
0
 public void Should_Return_III_Given_Input_3()
 {
     Assert.AreEqual("III", RomanNumerals.Convert(3));
 }
Beispiel #9
0
 public void Should_Return_XI_Given_Input_11()
 {
     Assert.AreEqual("XI", RomanNumerals.Convert(11));
 }
Beispiel #10
0
        public void OneConvertsToI()
        {
            RomanNumerals romanNumerals = new RomanNumerals();

            Assert.Equal(romanNumerals.convertToNumeral(1), "I");
        }
Beispiel #11
0
        public void OneThousandConvertsToM()
        {
            RomanNumerals romanNumerals = new RomanNumerals();

            Assert.Equal(romanNumerals.convertToNumeral(1000), "M");
        }
Beispiel #12
0
        public void TenConvertsToX()
        {
            RomanNumerals romanNumerals = new RomanNumerals();

            Assert.Equal(romanNumerals.convertToNumeral(10), "X");
        }
Beispiel #13
0
        public void FiveConvertsToV()
        {
            RomanNumerals romanNumerals = new RomanNumerals();

            Assert.Equal(romanNumerals.convertToNumeral(5), "V");
        }
Beispiel #14
0
        public void FourConvertsToIV()
        {
            RomanNumerals romanNumerals = new RomanNumerals();

            Assert.Equal(romanNumerals.convertToNumeral(4), "IV");
        }
Beispiel #15
0
        public void ThreeConvertsToIII()
        {
            RomanNumerals romanNumerals = new RomanNumerals();

            Assert.Equal(romanNumerals.convertToNumeral(3), "III");
        }
Beispiel #16
0
 public void Should_Return_CC_Given_Input_200()
 {
     Assert.AreEqual("CC", RomanNumerals.Convert(200));
 }
Beispiel #17
0
 public void Should_ValidateInput_Given_Input_2()
 {
     Assert.IsTrue(RomanNumerals.ValidateInput(2));
 }
Beispiel #18
0
 public void Should_Return_XV_Given_Input_15()
 {
     Assert.AreEqual("XV", RomanNumerals.Convert(15));
 }
Beispiel #19
0
 public void Should_Return_XVIII_Given_Input_18()
 {
     Assert.AreEqual("XVIII", RomanNumerals.Convert(18));
 }
Beispiel #20
0
 public void Should_Return_XIX_Given_Input_19()
 {
     Assert.AreEqual("XIX", RomanNumerals.Convert(19));
 }
Beispiel #21
0
 public void Should_Return_IV_Given_Input_4()
 {
     Assert.AreEqual("IV", RomanNumerals.Convert(4));
 }
Beispiel #22
0
 public void Should_Return_XX_Given_Input_20()
 {
     Assert.AreEqual("XX", RomanNumerals.Convert(20));
 }
Beispiel #23
0
 public void Should_Return_VII_Given_Input_7()
 {
     Assert.AreEqual("VII", RomanNumerals.Convert(7));
 }
Beispiel #24
0
 public void Should_Return_M_Given_Input_1000()
 {
     Assert.AreEqual("M", RomanNumerals.Convert(1000));
 }