예제 #1
0
        public void LevelUpMaxHealthWorks()
        {
            //Given
            BattleStats bs = new BattleStats();

            bs.LevelUp("MaxHealth");

            //When
            int expected = 25;
            int actual   = bs.MaxHealth;

            //Then
            Assert.True(expected == actual);
        }
예제 #2
0
        public void LevelUpDefenseWorks()
        {
            //Given
            BattleStats bs = new BattleStats();

            bs.LevelUp("Defense");

            //When
            int expected = 5;
            int actual   = bs.Defense;

            //Then
            Assert.True(expected == actual);
        }
예제 #3
0
        public void LevelUpSpeedWorks()
        {
            //Given
            BattleStats bs = new BattleStats();

            bs.LevelUp("Speed");

            //When
            int expected = 5;
            int actual   = bs.Speed;

            //Then
            Assert.True(expected == actual);
        }
예제 #4
0
        public void LevelUpAttackWorks()
        {
            //Given
            BattleStats bs = new BattleStats();

            bs.LevelUp("Attack");

            //When
            int expected = 5;
            int actual   = bs.Attack;

            //Then
            Assert.True(expected == actual);
        }
예제 #5
0
        public void LevelUpErrorWorks()
        {
            //Given
            BattleStats bs          = new BattleStats();
            bool        errorThrown = false;

            try
            {
                bs.LevelUp("Bogus");
            }
            catch (System.Exception)
            {
                errorThrown = true;
            }

            //Then
            Assert.True(errorThrown);
        }