38 lines
1.3 KiB
C#
38 lines
1.3 KiB
C#
|
using NUnit.Framework;
|
||
|
using PkmnLibSharp.StaticData;
|
||
|
|
||
|
namespace PkmnLibRSharpTests.StaticData
|
||
|
{
|
||
|
public class GrowthRateTests
|
||
|
{
|
||
|
[Test]
|
||
|
public void CreateAndDropLookupGrowthRate()
|
||
|
{
|
||
|
var growthRate = new LookupGrowthRate(new uint[] { 0, 1, 5, 10, 20, 100, 200, 500 });
|
||
|
growthRate.Dispose();
|
||
|
}
|
||
|
|
||
|
[Test]
|
||
|
public void LookupGrowthRateCalculateLevel()
|
||
|
{
|
||
|
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));
|
||
|
growthRate.Dispose();
|
||
|
}
|
||
|
|
||
|
[Test]
|
||
|
public void LookupGrowthRateCalculateExperience()
|
||
|
{
|
||
|
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));
|
||
|
growthRate.Dispose();
|
||
|
}
|
||
|
|
||
|
}
|
||
|
}
|