94 lines
3.0 KiB
C#
94 lines
3.0 KiB
C#
using NUnit.Framework;
|
|
using PkmnLibSharp.StaticData;
|
|
|
|
namespace PkmnLibRSharpTests.StaticData.Libraries
|
|
{
|
|
public class CommonGrowthRateTests
|
|
{
|
|
[TestCase(1, 0)]
|
|
[TestCase(20, 12_800)]
|
|
[TestCase(40, 76_800)]
|
|
[TestCase(60, 194_400)]
|
|
[TestCase(68, 257_834)]
|
|
[TestCase(70, 276_458)]
|
|
[TestCase(80, 378_880)]
|
|
[TestCase(90, 491_346)]
|
|
[TestCase(98, 583_539)]
|
|
[TestCase(100, 600_000)]
|
|
public void ErraticExperience(byte level, int experience)
|
|
{
|
|
var growthRate = CommonGrowthRates.Erratic(100);
|
|
Assert.AreEqual(experience, growthRate.CalculateExperience(level));
|
|
}
|
|
|
|
[TestCase(1, 0)]
|
|
[TestCase(20, 6_400)]
|
|
[TestCase(40, 51_200)]
|
|
[TestCase(60, 172_800)]
|
|
[TestCase(70, 274_400)]
|
|
[TestCase(80, 409_600)]
|
|
[TestCase(90, 583_200)]
|
|
[TestCase(100, 800_000)]
|
|
public void FastExperience(byte level, int experience)
|
|
{
|
|
var growthRate = CommonGrowthRates.Fast(100);
|
|
Assert.AreEqual(experience, growthRate.CalculateExperience(level));
|
|
}
|
|
|
|
[TestCase(1, 0)]
|
|
[TestCase(20, 8_000)]
|
|
[TestCase(40, 64_000)]
|
|
[TestCase(60, 216_000)]
|
|
[TestCase(70, 343_000)]
|
|
[TestCase(80, 512_000)]
|
|
[TestCase(90, 729_000)]
|
|
[TestCase(100, 1_000_000)]
|
|
public void MediumFastExperience(byte level, int experience)
|
|
{
|
|
var growthRate = CommonGrowthRates.MediumFast(100);
|
|
Assert.AreEqual(experience, growthRate.CalculateExperience(level));
|
|
}
|
|
|
|
[TestCase(1, 0)]
|
|
[TestCase(20, 5_460)]
|
|
[TestCase(40, 56_660)]
|
|
[TestCase(60, 211_060)]
|
|
[TestCase(70, 344_960)]
|
|
[TestCase(80, 526_260)]
|
|
[TestCase(90, 762_160)]
|
|
[TestCase(100, 1_059_860)]
|
|
public void MediumSlowExperience(byte level, int experience)
|
|
{
|
|
var growthRate = CommonGrowthRates.MediumSlow(100);
|
|
Assert.AreEqual(experience, growthRate.CalculateExperience(level));
|
|
}
|
|
|
|
[TestCase(1, 0)]
|
|
[TestCase(20, 10_000)]
|
|
[TestCase(40, 80_000)]
|
|
[TestCase(60, 270_000)]
|
|
[TestCase(70, 428_750)]
|
|
[TestCase(80, 640_000)]
|
|
[TestCase(90, 911_250)]
|
|
[TestCase(100, 1_250_000)]
|
|
public void SlowExperience(byte level, int experience)
|
|
{
|
|
var growthRate = CommonGrowthRates.Slow(100);
|
|
Assert.AreEqual(experience, growthRate.CalculateExperience(level));
|
|
}
|
|
|
|
[TestCase(1, 0)]
|
|
[TestCase(20, 5_440)]
|
|
[TestCase(40, 66_560)]
|
|
[TestCase(60, 267_840)]
|
|
[TestCase(70, 459_620)]
|
|
[TestCase(80, 737_280)]
|
|
[TestCase(90, 1_122_660)]
|
|
[TestCase(100, 1_640_000)]
|
|
public void FluctuatingExperience(byte level, int experience)
|
|
{
|
|
var growthRate = CommonGrowthRates.Fluctuating(100);
|
|
Assert.AreEqual(experience, growthRate.CalculateExperience(level));
|
|
}
|
|
}
|
|
} |