public void ShouldSortArrayInAscendingOrder(Type sutType) { var sut = (IComparer <string>)Activator.CreateInstance(sutType, args: new object[] { Column, Separator }) !; var rows = new string[_unsortedRows.Count]; _unsortedRows.CopyTo(rows); Array.Sort(rows, sut); rows[0].ShouldBe(_unsortedRows.Row1); // Abernathy rows[1].ShouldBe(_unsortedRows.Row3); // Brown rows[2].ShouldBe(_unsortedRows.Row2); // Homenick rows[3].ShouldBe(_unsortedRows.Row4); // Schneider rows[4].ShouldBe(_unsortedRows.Row5); // Wolf }
public void IterationSetup() { _rows = new string[_unsortedRows.Count]; _unsortedRows.CopyTo(_rows); }