public void Should_ThrowError_Number_LessThan1_MoreThan3999(int number)
        {
            var expected = new ArgumentOutOfRangeException(RomanConverter.ErrOutOfRange);

            Assert.Throws(Is.TypeOf <ArgumentOutOfRangeException>().And.Message.EqualTo(expected.Message), delegate
            {
                RomanConverter.Validate(number);
            });
        }
        public void Should_ThrowError_InvalidNumber(int number)
        {
            var expected = new Exception(RomanConverter.ErrInvalidInput);

            Assert.Throws(Is.TypeOf <Exception>().And.Message.EqualTo(expected.Message), delegate
            {
                RomanConverter.Convert(number);
            });
        }
        public void Should_Return_True_Number_Between_1_To_3999(int number)
        {
            var answer = RomanConverter.Validate(number);

            Assert.IsTrue(answer);
        }
        public void Should_Get_RomanNumeral_Answer(int number, string expected)
        {
            var answer = RomanConverter.Convert(number);

            Assert.AreEqual(expected, answer);
        }
Exemple #5
0
 static void Main(string[] args)
 {
     var answer = RomanConverter.Convert(99);
 }