public void BasePlayerModel_LevelUpToValue_InValid_Lower_Level_Should_Fail() { // Arrange var data = new BasePlayerModel <CharacterModel> { Level = 5, ExperienceTotal = 10000, }; // Act var result = data.LevelUpToValue(1); // Reset // Assert Assert.AreEqual(5, result); }
public void BasePlayerModel_LevelUpToValue_InValid_Max_Level_Should_Skip() { // Arrange var data = new BasePlayerModel <CharacterModel> { Level = 1, ExperienceTotal = 1000000, }; // Act var result = data.LevelUpToValue(LevelTableHelper.MaxLevel + 1); // Reset // Assert Assert.AreEqual(data.Level, result); }
public void BasePlayerModel_LevelUpToValue_Valid_Should_Pass() { // Arrange var TargetLevel = 2; var NeededExperience = LevelTableHelper.LevelDetailsList[TargetLevel].Experience; var data = new BasePlayerModel <CharacterModel> { Level = 1, ExperienceTotal = NeededExperience + 1 }; // Act var result = data.LevelUpToValue(2); // Reset // Assert Assert.AreEqual(2, result); }