29 lines
983 B
C#
29 lines
983 B
C#
using NUnit.Framework;
|
|
using PkmnLibSharp.StaticData;
|
|
|
|
namespace PkmnLibRSharpTests.StaticData
|
|
{
|
|
public class NatureTests
|
|
{
|
|
[Test]
|
|
public void InstantiateNatures(
|
|
[Values] Statistic increasedStat,
|
|
[Values] Statistic decreasedStat
|
|
)
|
|
{
|
|
var nature = new Nature(increasedStat, decreasedStat);
|
|
Assert.AreEqual(increasedStat, nature.IncreasedStat);
|
|
Assert.AreEqual(decreasedStat, nature.DecreasedStat);
|
|
if (increasedStat == decreasedStat)
|
|
{
|
|
Assert.AreEqual(1.0f, nature.GetStatModifier(increasedStat), 0.001f);
|
|
Assert.AreEqual(1.0f, nature.GetStatModifier(decreasedStat), 0.001f);
|
|
}
|
|
else
|
|
{
|
|
Assert.AreEqual(1.1f, nature.GetStatModifier(increasedStat), 0.001f);
|
|
Assert.AreEqual(0.9f, nature.GetStatModifier(decreasedStat), 0.001f);
|
|
}
|
|
}
|
|
}
|
|
} |