public void TestOne(string expected, int actual)
        {
            RomanNumeralsConverter romanNumeralsConverter = new RomanNumeralsConverter();
            string actualString = romanNumeralsConverter.Convert(actual);

            //Assert.AreEqual(expected, actualString);
            Check.That(actualString).IsEqualTo(expected);
        }
예제 #2
0
        public void Convert_GivenTeenNumber_ShouldAppendAccordingly(int number, string expected)
        {
            //Arrange
            var sut = new RomanNumeralsConverter();
            //Act
            var actual = sut.Convert(number);

            //Assert
            Assert.AreEqual(expected, actual);
        }
예제 #3
0
        public void Convert_GivenNumber2008_ShouldReturnMMVIII()
        {
            //Arrange
            var sut      = new RomanNumeralsConverter();
            var number   = 2008;
            var expected = "MMVIII";
            //Act
            var actual = sut.Convert(number);

            //Assert
            Assert.AreEqual(expected, actual);
        }
예제 #4
0
        public void Convert_GivenNumber10_ShouldReturnIX()
        {
            //Arrange
            var sut      = new RomanNumeralsConverter();
            var number   = 10;
            var expected = "X";
            //Act
            var actual = sut.Convert(number);

            //Assert
            Assert.AreEqual(expected, actual);
        }
예제 #5
0
        public void Convert_CMD_ThrowsException()
        {
            var numbersConverter = new RomanNumeralsConverter();

            numbersConverter.Convert("CMD");
        }
예제 #6
0
        public void Convert_CDLXVI_ReturnsFourHundredSixtySix()
        {
            var numbersConverter = new RomanNumeralsConverter();

            Assert.AreEqual(466U, numbersConverter.Convert("CDLXVI"));
        }
예제 #7
0
        public void Convert_CLXXXIV_ReturnsOneHundredEightyFour()
        {
            var numbersConverter = new RomanNumeralsConverter();

            Assert.AreEqual(184U, numbersConverter.Convert("CLXXXIV"));
        }
예제 #8
0
        public void Convert_LXXVIII_ReturnsSeventyEight()
        {
            var numbersConverter = new RomanNumeralsConverter();

            Assert.AreEqual(78U, numbersConverter.Convert("LXXVIII"));
        }
예제 #9
0
        public void TestReturnValueForTwo()
        {
            RomanNumeralsConverter rn = new RomanNumeralsConverter();

            Assert.AreEqual("II", rn.Convert(2));
        }
예제 #10
0
        public void Convert_VII_ReturnsSeven()
        {
            var numbersConverter = new RomanNumeralsConverter();

            Assert.AreEqual(7U, numbersConverter.Convert("VII"));
        }
예제 #11
0
        public void Convert_V_ReturnsFive()
        {
            var numbersConverter = new RomanNumeralsConverter();

            Assert.AreEqual(5U, numbersConverter.Convert("V"));
        }
예제 #12
0
        public void Convert_II_ReturnsTwo()
        {
            var numbersConverter = new RomanNumeralsConverter();

            Assert.AreEqual(2U, numbersConverter.Convert("II"));
        }
예제 #13
0
        public void Convert_I_ReturnsOne()
        {
            var numbersConverter = new RomanNumeralsConverter();

            Assert.AreEqual(1U, numbersConverter.Convert("I"));
        }
예제 #14
0
        public void Convert_EmptyString_ReturnsZero()
        {
            var numbersConverter = new RomanNumeralsConverter();

            Assert.AreEqual(0U, numbersConverter.Convert(string.Empty));
        }
예제 #15
0
        public void TestReturnValueForThreeFourTwentyTwo()
        {
            RomanNumeralsConverter rn = new RomanNumeralsConverter();

            Assert.AreEqual("MMMCDXXII", rn.Convert(3422));
        }
예제 #16
0
        public void Convert_IX_ReturnsNine()
        {
            var numbersConverter = new RomanNumeralsConverter();

            Assert.AreEqual(9U, numbersConverter.Convert("IX"));
        }
예제 #17
0
        public void Convert_XIV_ReturnsFourteen()
        {
            var numbersConverter = new RomanNumeralsConverter();

            Assert.AreEqual(14U, numbersConverter.Convert("XIV"));
        }
예제 #18
0
        public string ShouldConvertNumbers(int number)
        {
            var converter = new RomanNumeralsConverter();

            return(converter.Convert(number));
        }
예제 #19
0
        public void Test1()
        {
            RomanNumeralsConverter rn = new RomanNumeralsConverter();

            Assert.AreEqual("nulla", rn.Convert(0));
        }