Пример #1
0
        public void MockNoAttacksByInvalidTypeID()
        {
            var repo       = new AttackRepoMock();
            var attackList = repo.GetByTypeID(999999);

            Assert.IsNull(attackList);
        }
Пример #2
0
        public void MockNoAttackByInvalidID()
        {
            var repo        = new AttackRepoMock();
            var foundAttack = repo.GetByID(999999);

            Assert.IsNull(foundAttack);
        }
Пример #3
0
        public void MockCanGetSingleAttackByID()
        {
            var repo        = new AttackRepoMock();
            var foundAttack = repo.GetByID(3);

            Assert.AreEqual(3, foundAttack.AttackID);
            Assert.AreEqual("MockAName3", foundAttack.AttackName);
            Assert.AreEqual(10, foundAttack.AttackDamage);
            Assert.AreEqual(2, foundAttack.TypeID);
        }
Пример #4
0
        public void MockCanGetAttacksByTypeID()
        {
            var repo       = new AttackRepoMock();
            var attackList = repo.GetByTypeID(2).ToList();

            Assert.AreEqual(2, attackList.Count());
            Assert.AreEqual(3, attackList[0].AttackID);
            Assert.AreEqual("MockAName4", attackList[1].AttackName);
            Assert.AreEqual(20, attackList[1].AttackDamage);
            Assert.AreEqual(2, attackList[0].TypeID);
        }
Пример #5
0
        public void MockCanGetAllAttacks()
        {
            var repo       = new AttackRepoMock();
            var attackList = repo.GetAll();

            Assert.AreEqual(6, attackList.Count());
            Assert.AreEqual(1, attackList[0].AttackID);
            Assert.AreEqual("MockAName4", attackList[3].AttackName);
            Assert.AreEqual(20, attackList[5].AttackDamage);
            Assert.AreEqual(2, attackList[2].TypeID);
        }