public void MoveUp_OnFirstItem_ShouldIgnore() { CardItemCollection cardItemCollection = new CardItemCollection(); CardItem item = new CardItem { Name = "test" }; cardItemCollection.Add(item); cardItemCollection.MoveUp(item); Assert.AreEqual(1, item.Position); }
public void MoveUp_OnSecondItem_ShouldMove() { CardItemCollection cardItemCollection = new CardItemCollection(); CardItem item1 = new CardItem { Name = "test 01" }; CardItem item2 = new CardItem { Name = "test 02" }; cardItemCollection.Add(item1); cardItemCollection.Add(item2); cardItemCollection.MoveUp(item2); Assert.AreEqual(2, item1.Position); Assert.AreEqual(1, item2.Position); }