Exemple #1
0
        public void HackathonScenario_Scenario_43_Item_Description_Equal_Go_SU_Redhawks_Should_Use_Double_Value()
        {
            /*
             * Scenario Number:
             *      43
             *
             * Description:
             *      Whenever an item with the description "Go SU RedHawks", the item will use 2x
             *      the value of the item.
             *
             * Changes Required (Classes, Methods etc.)  List Files, Methods, and Describe Changes:
             *      Changed the TurnEngine.cs
             *
             * Test Algrorithm:
             *     Make an Item
             *     Make a Character
             *     Set Item description to "Go SU RedHawks"
             *     Set the Character to equip the item
             *
             * Test Conditions:
             *      If Item description equals "Go SU RedHawks" then it should use 2x the value of the item.
             *
             *  Validation
             *      Damage calculation based on double item value.
             *
             */

            //Arrange

            // Create Item
            var StrongItem = new ItemModel
            {
                Name        = "Hackathon 43 Item",
                Description = "Go SU RedHawks",
                Range       = 10,
                Value       = 20,
                Damage      = 20
            };

            ItemIndexViewModel.Instance.CreateAsync(StrongItem);

            // Create Character
            var CharacterPlayer = new PlayerInfoModel(
                new CharacterModel
            {
                BaseSpeed        = 5,
                Level            = 10,
                BaseHitPoints    = 100,
                ExperiencePoints = 100,
                BaseStrength     = 10,
                CurrentStrength  = 10,
                Name             = "Mike",
                Head             = StrongItem.Id
            });

            //Act
            var result = BattleEngine.CalculateDamage(CharacterPlayer);

            //Reset

            //Assert
            Assert.AreEqual(50, result);
        }