42 lines
1.1 KiB
C#
42 lines
1.1 KiB
C#
|
using NUnit.Framework;
|
||
|
using PkmnLibSharp.Library.GrowthRates;
|
||
|
|
||
|
namespace PkmnLibSharpTests.Library
|
||
|
{
|
||
|
public class GrowthRateLibraryTests
|
||
|
{
|
||
|
[Test]
|
||
|
public void ConstructDestruct()
|
||
|
{
|
||
|
var gr = new GrowthRateLibrary(0);
|
||
|
gr.Dispose();
|
||
|
}
|
||
|
|
||
|
[Test]
|
||
|
public void AddGrowthRate()
|
||
|
{
|
||
|
var gr = new GrowthRateLibrary(1);
|
||
|
gr.AddGrowthRate("foobar", new LookupGrowthRate(new uint[]{0,10,20,30,40,50}));
|
||
|
gr.Dispose();
|
||
|
}
|
||
|
|
||
|
[Test]
|
||
|
public void CalculateLevel()
|
||
|
{
|
||
|
var gr = new GrowthRateLibrary(1);
|
||
|
gr.AddGrowthRate("foobar", new LookupGrowthRate(new uint[]{0,10,20,30,40,50}));
|
||
|
Assert.AreEqual(5, gr.CalculateLevel("foobar", 40));
|
||
|
gr.Dispose();
|
||
|
}
|
||
|
|
||
|
[Test]
|
||
|
public void CalculateExperience()
|
||
|
{
|
||
|
var gr = new GrowthRateLibrary(1);
|
||
|
gr.AddGrowthRate("foobar", new LookupGrowthRate(new uint[]{0,10,20,30,40,50}));
|
||
|
Assert.AreEqual(40, gr.CalculateExperience("foobar", 5));
|
||
|
gr.Dispose();
|
||
|
}
|
||
|
|
||
|
}
|
||
|
}
|