public void Given_zero_items() { var input = new List<string>(); var persistentList = new PersistentList<string>(input); // should not throw if no items persistentList.Sort((x, y) => String.Compare(x, y, StringComparison.Ordinal)); }
public void Given_one_item() { var input = new[] { "a" }; var persistentList = new PersistentList<string>(input); // should not throw if only one item persistentList.Sort((x, y) => String.Compare(x, y, StringComparison.Ordinal)); }
public void Given__a_b() { var input = new[] { "a", "b" }; var persistentList = new PersistentList<string>(input); persistentList.Sort((x, y) => String.Compare(x, y, StringComparison.Ordinal)); persistentList[0].ShouldBeEqualTo("a"); persistentList[1].ShouldBeEqualTo("b"); }