public void when_the_number_9_is_passed_IX_should_be_returned()
        {
            var numberToConvert = 9;
            var translator      = new RomanNumeralTranslator();
            var result          = translator.NumberToNumeral(numberToConvert);

            Assert.Equal("IX", result);
        }
Exemple #2
0
        public void number_should_translate_to_roman_numeral(int input, string expectedResult)
        {
            //Arrange
            var translator = new RomanNumeralTranslator();
            //Act
            var actualResult = translator.TranslateToRomanNumeral(input);

            //Assert
            Assert.Equal(expectedResult, actualResult);
        }
Exemple #3
0
        public void the_number_is_translated_correctly_to_roman_numerals(int numberToConvert, string expectedNumeral)
        {
            //Arrange
            var translator = new RomanNumeralTranslator();
            //Act
            var actualResult = translator.NumberToNumeral(numberToConvert);

            //Assert
            Assert.Equal(expectedNumeral, actualResult);
        }
        //must be public, and return void, and take no parameters
        public void when_the_numer_1_is_passed_I_should_be_returned()
        {
            //Arrange
            var numberToConvert = 1;
            var translator      = new RomanNumeralTranslator();
            //Act
            var result = translator.NumberToNumeral(numberToConvert);

            //Assert
            Assert.Equal("I", result);
        }
Exemple #5
0
        public void when_the_number_9_is_passed_IX_should_be_returned()
        {
            //ARRANGE
            var numberToConvert = 9;
            var translator      = new RomanNumeralTranslator();
            var expectedResult  = "IX";

            //ACT
            var result = translator.NumberToNumeral(numberToConvert);

            //ASSERT
            Assert.Equal(expectedResult, result);
        }
        [Fact]                                                         // this says this is a test
        public void when_the_number_1_is_passed_i_should_be_returned() // must be public, return void and take no params
        {
            //Arrange -> context creation
            var numberToConvert = 1;
            var translator      = new RomanNumeralTranslator();

            //Act
            var result = translator.NumberToNumeral(numberToConvert);

            //Assert
            // equal(expected, actual) order is important
            Assert.Equal("I", result);
        }
Exemple #7
0
        [Fact]                         // denotes that this method is a test
        public void Translate_1_to_I() // must be public, return void, and take no parameters
        {
            // Arrange
            var numberToConvert = 1;
            var translator      = new RomanNumeralTranslator();
            var expectedResult  = "I";

            //Act
            var result = translator.NumberToNumeral(numberToConvert);

            //Assert
            Assert.Equal(expectedResult, result);
        }
Exemple #8
0
        public void Translate_5_to_V()
        {
            // Arrange
            var numberToConvert = 5;
            var translator      = new RomanNumeralTranslator();
            var expectedResult  = "V";

            //Act
            var result = translator.NumberToNumeral(numberToConvert);

            //Assert
            Assert.Equal(expectedResult, result);
        }
Exemple #9
0
        [Fact]                                                         // <--- explains that this method is a test
        public void when_the_number_1_is_passed_I_should_be_returned() //<--- must be public, return nothing/void and take no parameters
        {
            //ARRANGE ---> context creation
            var numberToConvert = 1;
            var translator      = new RomanNumeralTranslator();

            //ACT  ---> the action being taken in a given context
            var result = translator.NumberToNumeral(numberToConvert);

            //ASSERT  ---> my expectations as a result of the action
            //Assert.False(true);
            //throw new Exception("This will bomb out");
            Assert.Equal("I", result);
        }