Beispiel #1
0
        public void ListSort_ListWithInvalidString_IndexOutOfRangeException()
        {
            List <string> expected = new List <string>()
            {
                "qweqweab",
                "a",
                "dfsffdda"
            };

            Assert.Throws <InvalidOperationException>(() => StringSorter.ListSort(expected));
        }
Beispiel #2
0
        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));
        }
Beispiel #3
0
 public void ListSort_NullList_ArgumentNullException()
 {
     Assert.Throws <ArgumentNullException>(() => StringSorter.ListSort(null));
 }