public void Rearange() { var myList = new SimpleLinkedList <int>(new[] { 1, 3, 5, 2, 4, 6 }); myList.RearrangePairs(); var netList = new List <int>(); foreach (var i in myList) { netList.Add(i); } Assert.Equal(1, netList[0]); Assert.Equal(2, netList[1]); Assert.Equal(3, netList[2]); Assert.Equal(4, netList[3]); Assert.Equal(5, netList[4]); Assert.Equal(6, netList[5]); }