Example #1
0
        public void MonsterTypeEnumHelperTests_GetAttackMessage_Unknown_Should_Pass()
        {
            // Arrange
            var attackerFaculty = new MonsterModel {
                MonsterTypeEnum = MonsterTypeEnum.Unknown
            };
            var targetStudent = new CharacterModel {
                CharacterTypeEnum = CharacterTypeEnum.Unknown
            };

            // Act
            var result = MonsterTypeEnumHelper.GetAttackMessage(attackerFaculty.MonsterTypeEnum, targetStudent.CharacterTypeEnum);

            // Reset

            // Assert
            Assert.AreEqual("", result);
        }
Example #2
0
        public void MonsterTypeEnumHelperTests_GetAttackMessage_Faculty_Attacks_Parent_Should_Pass()
        {
            // Arrange
            var attackerFaculty = new MonsterModel {
                MonsterTypeEnum = MonsterTypeEnum.Faculty
            };
            var targetStudent = new CharacterModel {
                CharacterTypeEnum = CharacterTypeEnum.Parent
            };

            // Act
            var result = MonsterTypeEnumHelper.GetAttackMessage(attackerFaculty.MonsterTypeEnum, targetStudent.CharacterTypeEnum);

            // Reset

            // Assert
            Assert.AreEqual(" calls for parent-teacher conference with ", result);
        }
Example #3
0
        public void MonsterTypeEnumHelperTests_GetAttackMessage_Administrator_Attacks_Parent_Should_Pass()
        {
            // Arrange
            var attackerFaculty = new MonsterModel {
                MonsterTypeEnum = MonsterTypeEnum.Administrator
            };
            var targetStudent = new CharacterModel {
                CharacterTypeEnum = CharacterTypeEnum.Parent
            };

            // Act
            var result = MonsterTypeEnumHelper.GetAttackMessage(attackerFaculty.MonsterTypeEnum, targetStudent.CharacterTypeEnum);

            // Reset

            // Assert
            Assert.AreEqual(" requests payment from ", result);
        }
Example #4
0
        public void MonsterTypeEnumHelperTests_GetAttackMessage_Faculty_Attacks_Student_Should_Pass()
        {
            // Arrange
            var attackerFaculty = new MonsterModel {
                MonsterTypeEnum = MonsterTypeEnum.Faculty
            };
            var targetStudent = new CharacterModel {
                CharacterTypeEnum = CharacterTypeEnum.Student
            };

            // Act
            var result = MonsterTypeEnumHelper.GetAttackMessage(attackerFaculty.MonsterTypeEnum, targetStudent.CharacterTypeEnum);

            // Reset

            // Assert
            Assert.AreEqual(" gives an exam to ", result);
        }
Example #5
0
        /// <summary>
        /// helper method to get the attack message for Monster to Character
        /// </summary>
        /// <param name="attacker"></param>
        /// <param name="target"></param>
        /// <returns></returns>
        public string TurnMessageResultForAttackMonster(MonsterTypeEnum attacker, CharacterTypeEnum target)
        {
            string msg = "";

            switch (EngineSettings.BattleMessagesModel.HitStatus)
            {
            case HitStatusEnum.CriticalHit:
                msg = attacker.ToString() + MonsterTypeEnumHelper.GetAttackMessage(attacker, target) + target.ToString() + ". ";
                break;

            case HitStatusEnum.Hit:
                msg = attacker.ToString() + MonsterTypeEnumHelper.GetAttackMessage(attacker, target) + target.ToString() + ". ";
                break;

            default:
                break;
            }

            return(msg);
        }