public void DoubleConversion_AlphabeticLetters_TheSameLetters() { foreach (var sample in Samples) { Assert.Equal(sample.Letters, AlphabetConverter.IntToLetters((int)AlphabetConverter.LettersToInt(sample.Letters))); } }
public void IntToLetters_Number_ExpectedAlphabetLetters() { foreach (var sample in Samples) { Assert.Equal(sample.Letters, AlphabetConverter.IntToLetters(sample.Number)); } }
public string GetValue(int column, int row) { if (column == 1 && row == 1) { return("/"); } if (row == 1) { return(AlphabetConverter.IntToLetters(column - 1)); } if (column == 1) { return((row - 1).ToString()); } var value = View.GetValue(column - 1, row - 1); if (value == null) { return(string.Empty); } return(_original ? value.OriginalValue : value.ResultValue); }
public static string CoordinatesToKey(int column, int row) { return(AlphabetConverter.IntToLetters(column) + row); }
public void IntToLetters_NegativeNumber_ThrowIndexOutOfRangeException(int number) { Assert.Throws <IndexOutOfRangeException>(() => AlphabetConverter.IntToLetters(number)); }
public void IntToLetters_Zero_ThrowIndexOutOfRangeException() { Assert.Throws <IndexOutOfRangeException>(() => AlphabetConverter.IntToLetters(0)); }