public void ItWorksOnSingletonList() { var input = new[] { "coffee beans" }; var output = ListFormatter.Format(input).ToList(); Assert.AreEqual("1. Coffee beans", output[0]); }
public void ItWorksOnAVeryLongList() { var size = 100000; var input = Enumerable.Range(1, size).Select(i => $"item{i}"); var output = ListFormatter.Format(input).ToList(); Assert.That(output[size - 1].StartsWith("100000. Item")); }
internal static void _main() { var size = 100000; var shoppingList = Enumerable.Range(1, size).Select(i => $"item{i}"); ListFormatter.Format(shoppingList).ForEach(WriteLine); ReadKey(); }