Пример #1
0
        public void ArmoursSelect()
        {
            ArmourRepository repo = new ArmourRepository(new ArmourSQLContext());
            List <Armour>    c    = repo.GetAll();

            Assert.IsNotNull(c, "Armours weren't correctly retrieved");
        }
Пример #2
0
        public void ArmourSelect()
        {
            ArmourRepository repo = new ArmourRepository(new ArmourSQLContext());
            Armour           c    = repo.GetById(3);

            Assert.IsNotNull(c, "Armour wasn't correctly retrieved");
        }
Пример #3
0
        public void UpdateArmour()
        {
            ArmourRepository repo = new ArmourRepository(new ArmourSQLContext());
            Armour           c    = repo.GetById(3);

            c.PhysReduction += 20;
            int reduction = c.PhysReduction;

            repo.Update(c);
            c = repo.GetById(3);
            Assert.AreEqual(c.PhysReduction, reduction, "Armour wasn't updated.");
            c.PhysReduction -= 20;
            repo.Update(c);
        }