public void RomanTest(int input, string expected) { _subject = new RomanNumerals(); var result = _subject.Convert(input); Assert.Equal(expected, result); }
public void ReturnRomanGivenArabic(int input, string expected) { var numero = new RomanNumerals(); var result = numero.Convert(input); Assert.AreEqual(expected, result); }
public void Given_Input_Should_Return_Roman(int input, string expected) { var sut = new RomanNumerals(); var result = sut.Convert(input); Assert.Equal(expected, result); }
public void Convert_GivenANumberMoreThan49ButLessThan90_ShouldReturnItsRomanNumeral(string expected, int number) { //---------------Arrange------------------- var sut = new RomanNumerals(); //---------------Act ---------------------- var actual = sut.Convert(number); //---------------Assert ----------------------- Assert.AreEqual(expected, actual); }
public static void Main(string[] args) { var roman = new RomanNumerals(); System.Console.WriteLine("Give me a number:"); var input = System.Console.ReadLine(); try { var output = roman.Convert(int.Parse(input)); System.Console.WriteLine("The roman numeral is:"); System.Console.WriteLine(output); } catch { System.Console.WriteLine("Whoops!"); } }
public void ConverterReturnsString() { Assert.IsInstanceOf <string>(_romanNumerals.Convert(5)); }
public void ToArab() { var res = RomanNumerals.Convert("MCMX"); Assert.Equal(1910, res); }
public void ToRoman() { var res = RomanNumerals.Convert(1910); Assert.Equal("MCMX", res); }
public void ConvertArabicNumeralsToRoman(int arabicNumber, string rommanNumber) { Assert.Equal(rommanNumber, romanNumerals.Convert(arabicNumber)); }
public void Test1() { Assert.AreEqual(1941, RomanNumerals.Evaluate("MCMXLI")); Assert.AreEqual("MCMXLI", RomanNumerals.Convert(1941)); }
public void Test4() { Assert.AreEqual(2882, RomanNumerals.Evaluate("MMDCCCLXXXII")); Assert.AreEqual("MMDCCCLXXXII", RomanNumerals.Convert(2882)); }
public void Test3() { Assert.AreEqual(1398, RomanNumerals.Evaluate("MCCCXCVIII")); Assert.AreEqual("MCCCXCVIII", RomanNumerals.Convert(1398)); }
public void Test2() { Assert.AreEqual(1159, RomanNumerals.Evaluate("MCLIX")); Assert.AreEqual("MCLIX", RomanNumerals.Convert(1159)); }