PkmnLibRSharp/PkmnLibRSharpTests/StaticData/GrowthRateTests.cs

35 lines
1.2 KiB
C#
Raw Normal View History

2022-09-20 15:31:20 +00:00
using NUnit.Framework;
using PkmnLibSharp.StaticData;
namespace PkmnLibRSharpTests.StaticData
{
public class GrowthRateTests
{
[Test]
public void CreateAndDropLookupGrowthRate()
{
2022-10-08 11:42:30 +00:00
using var growthRate = new LookupGrowthRate(new uint[] { 0, 1, 5, 10, 20, 100, 200, 500 });
2022-09-20 15:31:20 +00:00
}
[Test]
public void LookupGrowthRateCalculateLevel()
{
2022-10-08 11:42:30 +00:00
using var growthRate = new LookupGrowthRate(new uint[] { 0, 1, 5, 10, 20, 100, 200, 500 });
2022-09-20 15:31:20 +00:00
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()
{
2022-10-08 11:42:30 +00:00
using var growthRate = new LookupGrowthRate(new uint[] { 0, 1, 5, 10, 20, 100, 200, 500 });
2022-09-20 15:31:20 +00:00
Assert.AreEqual(0, growthRate.CalculateExperience(1));
Assert.AreEqual(1, growthRate.CalculateExperience(2));
Assert.AreEqual(5, growthRate.CalculateExperience(3));
Assert.AreEqual(10, growthRate.CalculateExperience(4));
}
}
}