public void ListSort_ListWithInvalidString_IndexOutOfRangeException() { List <string> expected = new List <string>() { "qweqweab", "a", "dfsffdda" }; Assert.Throws <InvalidOperationException>(() => StringSorter.ListSort(expected)); }
public void ListSort_SomeStrings_SortedStrings() { List <string> strings = new List <string>() { "asdasdcb", "qweqweab", "dfsffdda" }; List <string> expected = new List <string>() { "qweqweab", "asdasdcb", "dfsffdda" }; CollectionAssert.AreEqual(expected, StringSorter.ListSort(strings)); }
public void ListSort_NullList_ArgumentNullException() { Assert.Throws <ArgumentNullException>(() => StringSorter.ListSort(null)); }