예제 #1
0
        private void UpdateLevelProgressionList()
        {
            _levelProgression = new List <XpPerLevelHolder>();

            for (int i = 1; i <= 20; i++)
            {
                _xpPerLevelHolder = new XpPerLevelHolder
                {
                    Level = i,
                    XP    = _xpCalculatorProgression.CalculateXPByLevel(i)
                };

                _levelProgression.Add(_xpPerLevelHolder);
            }
        }
예제 #2
0
        public void TestCalculateXPByLevel()
        {
            // Arrange
            XPCalculator xpCalculator = new XPCalculator();
            long         expectedXP   = 66000,
                         actualXP,
                         level = 12;

            // Act
            actualXP = xpCalculator.CalculateXPByLevel(level);

            // Assert
            Assert.Equal(expectedXP, actualXP);
        }