コード例 #1
0
        public void Arabic_WhenCantConvertValue_ShouldRiseAnException()
        {
            // Arrange
            NumberToRomanConvertor roman = new NumberToRomanConvertor();
            //Act
            Action actual = () => roman.NumberToRoman(-1);

            //Assert
            Assert.Throws <ArgumentException>(actual);
        }
コード例 #2
0
        public void Arabic_WhenConvertIntegerValue_ShouldReturnRomanString(string expected, int value)
        {
            // Arrange
            NumberToRomanConvertor roman = new NumberToRomanConvertor();
            //Act
            string actual = roman.NumberToRoman(value);

            //Assert
            Assert.Equal(expected, actual);
        }