public void CardSort_Sort_Work1() { var cardSortService = new CardSortService(MockRepository.GenerateStub <ILogger>()); var result = cardSortService.Sort(new Card[] { new Card(new City("b"), new City("c")), new Card(new City("a"), new City("b")), new Card(new City("c"), new City("d")), }); Assert.AreEqual(3, result.Length); Assert.AreEqual("a", result[0].From.Name); Assert.AreEqual("b", result[1].From.Name); Assert.AreEqual("c", result[2].From.Name); }
public void CardSort_Sort_ArgumentException() { var cardSortService = new CardSortService(MockRepository.GenerateStub <ILogger>()); Assert.Throws <ArgumentNullException>(() => cardSortService.Sort(null)); }