public void should_expand_a_one_column_range_correctly(string range, string expectedRange) { IRangeExpander rangeExpander = new RangeExpander(); var actualRange = rangeExpander.Expand(range); Assert.Equal(expectedRange, actualRange); }
public void should_full_expand_a_one_column_incomplete_range_correctly(string range) { string expectedRange = ""; var rangeValues = new List <string>(); for (int i = 1; i <= maximumColumnCount; i++) { rangeValues.Add("A" + i); } expectedRange = string.Join(",", rangeValues); IRangeExpander rangeExpander = new RangeExpander(); var actualRange = rangeExpander.Expand(range); Assert.Equal(expectedRange, actualRange); }
public void should_throw_exception_if_range_is_invalid(string range) { IRangeExpander rangeExpander = new RangeExpander(); Assert.Throws <InvalidOperationException>(() => rangeExpander.Expand(range)); }