예제 #1
0
        public void TestMoveItemShouldMoveToLeft()
        {
            LayersBLMock mock = new LayersBLMock();
            Item itemToMove = new Item() { ItemName = "2", ItemAmount = 1, CreationDate = DateTime.Parse("11.11.2011") };
            mock.List2.Add(itemToMove);
            mock.MoveItem(itemToMove);

            Assert.AreEqual(4, mock.List1.Count);
            Assert.AreEqual(0, mock.List2.Count);
            Item iResult = mock.List1[3];
            Assert.AreEqual("2", iResult.ItemName);
            Assert.AreEqual(1, iResult.ItemAmount);
            DateTime dt = DateTime.Parse("11.11.2011");
            Assert.AreEqual(dt, iResult.CreationDate);
        }
예제 #2
0
 public void TestMoveItemShouldThrowItemNotFound()
 {
     LayersBLMock mock = new LayersBLMock();
     Item itemToMove = new Item() { ItemName = "2", ItemAmount = 1, CreationDate = DateTime.Parse("11.11.2011") };
     mock.MoveItem(itemToMove);
 }