2022-09-18 16:02:27 +00:00
|
|
|
using NUnit.Framework;
|
|
|
|
using PkmnLibSharp.StaticData;
|
|
|
|
|
|
|
|
namespace PkmnLibRSharpTests.StaticData
|
|
|
|
{
|
|
|
|
public class NatureTests
|
|
|
|
{
|
|
|
|
[Test]
|
|
|
|
public void InstantiateNatures(
|
|
|
|
[Values] Statistic increasedStat,
|
|
|
|
[Values] Statistic decreasedStat
|
|
|
|
)
|
|
|
|
{
|
2022-09-23 18:18:52 +00:00
|
|
|
using var nature = new Nature(increasedStat, decreasedStat);
|
2022-09-18 16:02:27 +00:00
|
|
|
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);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|