Ejemplo n.º 1
0
        public void BattleModeEnumHelper_ConvertMessageStringToEnum_Bogus_Should_Fail()
        {
            // Arrange

            // Act
            var result = BattleModeEnumHelper.ConvertMessageStringToEnum("Bogus");

            // Assert
            Assert.AreEqual(BattleModeEnum.Unknown, result);
        }
Ejemplo n.º 2
0
        public void BattleModeEnumHelper_ConvertMessageStringToEnum_Valid_Should_Pass()
        {
            // Arrange

            // Act
            var result = BattleModeEnumHelper.ConvertMessageStringToEnum("Map All Actions");

            // Assert
            Assert.AreEqual(BattleModeEnum.MapFull, result);
        }
        public void BattleModeEnumHelperTests_ConvertMessageStringToEnum_BogusString_Should_Pass()
        {
            // Arrange

            // Act
            var result = BattleModeEnumHelper.ConvertMessageStringToEnum("This doesn't exist");

            // Reset

            // Assert
            Assert.AreEqual(BattleModeEnum.Unknown, result);
        }
        public void BattleModeEnumHelperTests_ConvertMessageStringToEnum_SimpleNext_Should_Pass()
        {
            // Arrange

            // Act
            var result = BattleModeEnumHelper.ConvertMessageStringToEnum("Simple Next");

            // Reset

            // Assert
            Assert.AreEqual(BattleModeEnum.SimpleNext, result);
        }
        public void BattleModeEnumHelperTests_ConvertMessageStringToEnum_MapAbility_Should_Pass()
        {
            // Arrange

            // Act
            var result = BattleModeEnumHelper.ConvertMessageStringToEnum("Map Abilities");

            // Reset

            // Assert
            Assert.AreEqual(BattleModeEnum.MapAbility, result);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Set the Character Hit Enum
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        public void BattleModePicker_Changed(object sender, EventArgs args)
        {
            // Check for null, SelectedItem is not set when the control is created
            if (BattleModePicker.SelectedItem == null)
            {
                return;
            }

            // Change the Difficulty
            BattleEngineViewModel.Instance.Engine.EngineSettings.BattleSettingsModel.BattleModeEnum = BattleModeEnumHelper.ConvertMessageStringToEnum(BattleModePicker.SelectedItem.ToString());
        }