public void Should_Return_Same_Card_If_Only_One_In_The_Deck() { Card[] deck = { new Card("Moscow", "Paris") }; var sorter = new DeckSorter(deck); sorter.Sort(); Assert.AreEqual("Moscow", deck[0].From); Assert.AreEqual("Paris", deck[0].To); }
public void Should_Not_Change_Order_If_Cards_Already_Sorted() { Card[] deck = { new Card("Moscow", "Paris"), new Card("Paris", "Berlin") }; var sorter = new DeckSorter(deck); sorter.Sort(); Assert.AreEqual("Moscow", deck[0].From); Assert.AreEqual("Paris", deck[0].To); Assert.AreEqual("Paris", deck[1].From); Assert.AreEqual("Berlin", deck[1].To); }