Exemplo n.º 1
0
        public void GivenTripleDigitIntegerReturnsCorrespondingRomanNumeral(int number, string expected)
        {
            var romanNumeralConvertor = new RomanNumeralConvertor();
            var actual = romanNumeralConvertor.ConvertNumberToRomanNumeral(number);

            Assert.Equal(expected, actual);
        }
Exemplo n.º 2
0
        public void GivenRomanNumeralReturnCorrespondingInteger(string romanNumeral, int expected)
        {
            var romanNumeralConvertor = new RomanNumeralConvertor();
            var actual = romanNumeralConvertor.ConvertRomanNumeralToNumber(romanNumeral);

            Assert.Equal(expected, actual);
        }
        public void convert_numbers_to_roman_numerals(int input, string expectedResult)
        {
            // Arrange -- Context              -- Given
            var convert = new RomanNumeralConvertor();

            // Act     -- Do the thing         -- When
            var actualResult = convert.ConvertToRoman(input);

            // Assert  -- checking the result  -- Then
            Assert.Equal(expectedResult, actualResult);
        }
Exemplo n.º 4
0
        public void Given1ReturnI()
        {
            //Arrange
            int i = 1;
            RomanNumeralConvertor rnc = new RomanNumeralConvertor();

            // Act
            string rNumeral = rnc.ConvertToRomanNumeral(i);

            // Assert
            Assert.AreEqual(rNumeral, "I");
        }
Exemplo n.º 5
0
        public void Given1989ReturnMCMLXXXIX()
        {
            //Arrange
            int i = 1989;
            RomanNumeralConvertor rnc = new RomanNumeralConvertor();

            // Act
            string rNumeral = rnc.ConvertToRomanNumeral(i);

            // Assert
            Assert.AreEqual(rNumeral, "MCMLXXXIX");
        }
        public void converting_number_44()
        {
            // Arrange -- Context             -- Given
            var convertor      = new RomanNumeralConvertor();
            var input          = 44;
            var expectedResult = "XLIV";

            // Act     -- Do the thing        -- When
            var actualResult = convertor.ToRoman(input);

            // Assert  -- Checking the result -- Then
            Assert.Equal(expectedResult, actualResult);
        }
        public void decimal_should_convert_to_roman_numeral(int number, string symbol)
        {
            var result = RomanNumeralConvertor.Convert(number);

            result.Should().Be(symbol);
        }