Пример #1
0
        public async Task CreateSkillAsync_InvalidAttributeName_ReturnCreationFailed()
        {
            var charProvider = new MockCharacterProvider();
            var statProvider = new MockStatisticProvider();
            var controller   = new StatisticController(charProvider, statProvider, null);

            var result = await controller.CreateSkillAsync("Intimidation", "STR");

            Assert.Equal(StatisticResult.StatisticCreationFailed(), result);
        }
Пример #2
0
        public async Task CreateSkillAsync_AlreadyExists_ReturnNameAlreadyExists()
        {
            var charProvider = new MockCharacterProvider();
            var statProvider = new MockStatisticProvider();
            var controller   = new StatisticController(charProvider, statProvider, null);

            var result = await controller.CreateSkillAsync("Powerlifting", "Strength");

            Assert.Equal(StatisticResult.NameAlreadyExists(), result);
        }
Пример #3
0
        public async Task CreateSkillAsync_ValidInput_ReturnSuccess()
        {
            var charProvider = new MockCharacterProvider();
            var statProvider = new MockStatisticProvider();
            var controller   = new StatisticController(charProvider, statProvider, null);

            var result = await controller.CreateSkillAsync("Intimidation", "Strength");

            Assert.Equal(StatisticResult.StatisticCreatedSuccessfully(), result);
        }
Пример #4
0
        public async Task CreateSkillAsync(string statName, [Remainder] string attribName)
        {
            var result = await _statController.CreateSkillAsync(statName, attribName);

            await ReplyAsync(result.Message);
        }
Пример #5
0
        public static async Task Seed(StatisticController _statController)
        {
            await _statController.CreateAttributeAsync("Strength");

            await _statController.CreateAttributeAsync("Perception");

            await _statController.CreateAttributeAsync("Endurance");

            await _statController.CreateAttributeAsync("Charisma");

            await _statController.CreateAttributeAsync("Intelligence");

            await _statController.CreateAttributeAsync("Agility");

            await _statController.CreateAttributeAsync("Luck");

            await _statController.AddAliasAsync("Strength", "STR");

            await _statController.AddAliasAsync("Perception", "PER");

            await _statController.AddAliasAsync("Endurance", "END");

            await _statController.AddAliasAsync("Charisma", "CHA");

            await _statController.AddAliasAsync("Intelligence", "INT");

            await _statController.AddAliasAsync("Agility", "AGI");

            await _statController.AddAliasAsync("Luck", "LCK");

            await _statController.CreateSkillAsync("Barter", "Charisma");

            await _statController.CreateSkillAsync("Energy Weapons", "Perception");

            await _statController.CreateSkillAsync("Explosives", "Perception");

            await _statController.CreateSkillAsync("Guns", "Agility");

            await _statController.CreateSkillAsync("Lockpick", "Perception");

            await _statController.CreateSkillAsync("Medicine", "Intelligence");

            await _statController.CreateSkillAsync("Melee Weapons", "Strength");

            await _statController.CreateSkillAsync("Repair", "Intelligence");

            await _statController.CreateSkillAsync("Science", "Intelligence");

            await _statController.CreateSkillAsync("Sneak", "Agility");

            await _statController.CreateSkillAsync("Speech", "Charisma");

            await _statController.CreateSkillAsync("Survival", "Endurance");

            await _statController.CreateSkillAsync("Unarmed", "Endurance");
        }