using NUnit.Framework; using PkmnLibSharp.StaticData; using PkmnLibSharp.StaticData.Libraries; namespace PkmnLibRSharpTests.StaticData.Libraries { public class GrowthRateLibraryTests { [Test] public void CreateGrowthRateLibrary() { var library = GrowthRateLibrary.Create(0); } [Test] public void AddGrowthRateToLibrary() { var library = GrowthRateLibrary.Create(0); var growthRate = LookupGrowthRate.Create(new uint[] { 0, 1, 5, 10, 20, 100, 200, 500 }); library.AddGrowthRate("foobar", growthRate); } [Test] public void CalculateLevel() { var library = GrowthRateLibrary.Create(0); var growthRate = LookupGrowthRate.Create(new uint[] { 0, 1, 5, 10, 20, 100, 200, 500 }); library.AddGrowthRate("foobar", growthRate); var level = library.CalculateLevel("foobar", 20); Assert.AreEqual(5, level); } [Test] public void CalculateExperience() { var library = GrowthRateLibrary.Create(0); var growthRate = LookupGrowthRate.Create(new uint[] { 0, 1, 5, 10, 20, 100, 200, 500 }); library.AddGrowthRate("foobar", growthRate); var experience = library.CalculateExperience("foobar", 5); Assert.AreEqual(20, experience); } } }