public void SortByDescendingByName_Test() { db.Setup(x => x.Items.GetAll()).Returns(GetAllItems()); List <ItemDTO> act = mapper.Map <List <ItemDTO> >(service.SortByDescending(BLLSortCriteria.NAME)); var exp = GetAllItemsReverse(); Assert.NotNull(act); Assert.AreEqual(4, act.Count); Assert.AreEqual(exp[0].ItemId, act[0].ItemId); Assert.AreEqual(exp[0].ItemName, act[0].ItemName); Assert.AreEqual(exp[1].Price, act[1].Price); Assert.AreEqual(exp[1].CategoryId, act[1].CategoryId); }