public void ItWorksOnAVeryLongList() { var size = 100000; var input = Enumerable.Range(1, size).Select(i => $"item{i}").ToList(); var output = new ListFormatter().Format(input); Assert.AreEqual("100000. Item100000", output[size - 1]); }
[Test] public void ItWorksOnSingletonList() { var input = new List <string> { "coffee beans" }; var output = new ListFormatter().Format(input); Assert.AreEqual("1. Coffee beans", output[0]); }
public void ItWorksOnLongerList() { var input = new List <string> { "coffee beans", "BANANAS" }; var output = new ListFormatter().Format(input); Assert.AreEqual("1. Coffee beans", output[0]); Assert.AreEqual("2. Bananas", output[1]); }