using NUnit.Framework; using PkmnLibSharp.StaticData; namespace PkmnLibRSharpTests.StaticData { public class GrowthRateTests { [Test] public void CreateAndDropLookupGrowthRate() { using var growthRate = new LookupGrowthRate(new uint[] { 0, 1, 5, 10, 20, 100, 200, 500 }); } [Test] public void LookupGrowthRateCalculateLevel() { using var growthRate = new LookupGrowthRate(new uint[] { 0, 1, 5, 10, 20, 100, 200, 500 }); Assert.AreEqual(1, growthRate.CalculateLevel(0)); Assert.AreEqual(2, growthRate.CalculateLevel(1)); Assert.AreEqual(2, growthRate.CalculateLevel(2)); Assert.AreEqual(3, growthRate.CalculateLevel(5)); } [Test] public void LookupGrowthRateCalculateExperience() { using var growthRate = new LookupGrowthRate(new uint[] { 0, 1, 5, 10, 20, 100, 200, 500 }); Assert.AreEqual(0, growthRate.CalculateExperience(1)); Assert.AreEqual(1, growthRate.CalculateExperience(2)); Assert.AreEqual(5, growthRate.CalculateExperience(3)); Assert.AreEqual(10, growthRate.CalculateExperience(4)); } } }