Пример #1
0
        public void GetOneItemWhenThereIsNoElement()
        {
            dataAccess = new ItemsDataAccess(true);
            Item items = dataAccess.GetItem(3);

            Assert.IsNull(items);
        }
Пример #2
0
        public void GetOneElement()
        {
            dataAccess = new ItemsDataAccess(true);
            dataAccess.SaveItem(new Item()
            {
                Strength = 1, Dexterity = 2, Speed = 3, Defense = 4
            });
            dataAccess.SaveItem(new Item()
            {
                Strength = 2, Dexterity = 3, Speed = 4, Defense = 5
            });
            dataAccess.SaveItem(new Item()
            {
                Strength = 3, Dexterity = 4, Speed = 5, Defense = 6
            });
            Item items = dataAccess.GetItem(3);

            Assert.AreEqual(6, items.Defense);
        }