public void Return4ForIV() { string numberRoman = "IV"; StringBuilder sb = new StringBuilder(); sb.Append(numberRoman); int?expectedResult = 4; int?returnedValue; GoForIt gfi1 = new GoForIt(); returnedValue = gfi1.CalculateArabicNumber(numberRoman); Assert.AreEqual(expectedResult, returnedValue); }
public void ReturnNullIfTwoIIsInFrontOfBiggerNumber() { string numberRoman = "IIC"; StringBuilder sb = new StringBuilder(); sb.Append(numberRoman); int?expectedResult = null; int?returnedValue; GoForIt gfi1 = new GoForIt(); returnedValue = gfi1.CalculateArabicNumber(numberRoman); Assert.AreEqual(expectedResult, returnedValue); }
public void ReturnNullIfAnythingBiggerThanLFollowsIt() { string numberRoman = "LCDM"; StringBuilder sb = new StringBuilder(); sb.Append(numberRoman); int?expectedResult = null; int?returnedValue; GoForIt gfi1 = new GoForIt(); returnedValue = gfi1.CalculateArabicNumber(numberRoman); Assert.AreEqual(expectedResult, returnedValue); }
public void ReturnNullForMoreThan1Non_ConsecutiveV() { string numberRoman = "VIV"; StringBuilder sb = new StringBuilder(); sb.Append(numberRoman); int?expectedResult = 9; int?returnedValue; GoForIt gfi1 = new GoForIt(); returnedValue = gfi1.CalculateArabicNumber(numberRoman); Assert.AreEqual(expectedResult, returnedValue); }