コード例 #1
0
 public void IsSortedOnSortedList()
 {
     SinglyLinkedList list = new SinglyLinkedList("bar", "foo");
     Assert.IsTrue(list.IsSorted());
 }
コード例 #2
0
 public void IsSortedOnUnsortedList()
 {
     SinglyLinkedList list = new SinglyLinkedList("foo", "bar");
     Assert.IsFalse(list.IsSorted());
 }
コード例 #3
0
 public void IsSortedOnEmptyList()
 {
     SinglyLinkedList list = new SinglyLinkedList();
     Assert.IsTrue(list.IsSorted());
 }
コード例 #4
0
 public void IsSortedOnListOfDuplicates()
 {
     SinglyLinkedList list = new SinglyLinkedList("foo", "foo");
     Assert.IsTrue(list.IsSorted());
 }
コード例 #5
0
 public void IsSortedOnSingleItemList()
 {
     SinglyLinkedList<string> list = new SinglyLinkedList<string>("foo");
     Assert.IsTrue(list.IsSorted());
 }
コード例 #6
0
 public void IsSortedOnLargerUnsortedList()
 {
     SinglyLinkedList list = new SinglyLinkedList("bar", "grille", "foo", "apple");
     Assert.IsFalse(list.IsSorted());
 }
 public void IsSortedOnUnsortedMultipleItemList()
 {
     SinglyLinkedList list = new SinglyLinkedList("foo", "boo", "apple");
     Assert.IsFalse(list.IsSorted());
 }
 public void IsSortedOnSortedMultipleItemList()
 {
     SinglyLinkedList list = new SinglyLinkedList("apple", "bar", "foo");
     Assert.IsTrue(list.IsSorted());
 }
コード例 #9
0
 public void IsSortedOnSortedLongerList()
 {
     SinglyLinkedList list = new SinglyLinkedList("abc", "bar", "def", "foo", "zoo");
     Assert.IsTrue(list.IsSorted());
 }
コード例 #10
0
 public void IsSortedOnLongerUnsortedList()
 {
     SinglyLinkedList list = new SinglyLinkedList("foo", "bar", "cat", "ark");
     Assert.IsFalse(list.IsSorted());
 }
コード例 #11
0
 public void IsSortedOnLongerListWithDuplicates()
 {
     SinglyLinkedList list = new SinglyLinkedList("bar", "bar", "foo", "grille");
     Assert.IsTrue(list.IsSorted());
 }