示例#1
0
        public void should_give_player_xp_and_level_up()
        {
            var player = new PlayerBuilder()
                         .With(p => p.XP, 195)
                         .With(p => p.Level, 3)
                         .With(p => p.UnusedLevelUpPerks, 0)
                         .BuildAndSave();

            player.AddXP(10);
            Assert.That(player.XP, Is.EqualTo(5));
            Assert.That(player.Level, Is.EqualTo(4));
            Assert.That(player.UnusedLevelUpPerks, Is.EqualTo(1));
        }