Пример #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));
     }
 }
Пример #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));
     }
 }
Пример #3
0
 public void Should_Return_XC_Given_Input_90()
 {
     Assert.AreEqual("XC", RomanNumerals.Convert(90));
 }
Пример #4
0
 public void Should_Return_L_Given_Input_50()
 {
     Assert.AreEqual("L", RomanNumerals.Convert(50));
 }
Пример #5
0
 public void Should_Return_XL_Given_Input_40()
 {
     Assert.AreEqual("XL", RomanNumerals.Convert(40));
 }
Пример #6
0
 public void Should_Return_MMMCMXCIX_Given_Input_3999()
 {
     Assert.AreEqual("MMMCMXCIX", RomanNumerals.Convert(3999));
 }
Пример #7
0
 public void Should_Return_V_Given_Input_5()
 {
     Assert.AreEqual("V", RomanNumerals.Convert(5));
 }
Пример #8
0
 public void Should_Return_III_Given_Input_3()
 {
     Assert.AreEqual("III", RomanNumerals.Convert(3));
 }
Пример #9
0
 public void Should_Return_XI_Given_Input_11()
 {
     Assert.AreEqual("XI", RomanNumerals.Convert(11));
 }
Пример #10
0
        public void OneConvertsToI()
        {
            RomanNumerals romanNumerals = new RomanNumerals();

            Assert.Equal(romanNumerals.convertToNumeral(1), "I");
        }
Пример #11
0
        public void OneThousandConvertsToM()
        {
            RomanNumerals romanNumerals = new RomanNumerals();

            Assert.Equal(romanNumerals.convertToNumeral(1000), "M");
        }
Пример #12
0
        public void TenConvertsToX()
        {
            RomanNumerals romanNumerals = new RomanNumerals();

            Assert.Equal(romanNumerals.convertToNumeral(10), "X");
        }
Пример #13
0
        public void FiveConvertsToV()
        {
            RomanNumerals romanNumerals = new RomanNumerals();

            Assert.Equal(romanNumerals.convertToNumeral(5), "V");
        }
Пример #14
0
        public void FourConvertsToIV()
        {
            RomanNumerals romanNumerals = new RomanNumerals();

            Assert.Equal(romanNumerals.convertToNumeral(4), "IV");
        }
Пример #15
0
        public void ThreeConvertsToIII()
        {
            RomanNumerals romanNumerals = new RomanNumerals();

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