86 lines
4.2 KiB
C#
86 lines
4.2 KiB
C#
|
using NUnit.Framework;
|
||
|
using PkmnLibSharp.StaticData;
|
||
|
|
||
|
namespace PkmnLibRSharpTests.StaticData
|
||
|
{
|
||
|
public class StaticStaticStatisticSetTests
|
||
|
{
|
||
|
[Test]
|
||
|
public void ByteStaticStatisticSet([Random(1)] byte hp, [Random(1)] byte attack, [Random(1)] byte defense,
|
||
|
[Random(1)] byte specialAttack, [Random(1)] byte specialDefense, [Random(1)] byte speed)
|
||
|
{
|
||
|
using var set = new StaticStatisticSet<byte>(hp, attack, defense, specialAttack, specialDefense, speed);
|
||
|
Assert.AreEqual(set.HP, hp);
|
||
|
Assert.AreEqual(set.Attack, attack);
|
||
|
Assert.AreEqual(set.Defense, defense);
|
||
|
Assert.AreEqual(set.SpecialAttack, specialAttack);
|
||
|
Assert.AreEqual(set.SpecialDefense, specialDefense);
|
||
|
Assert.AreEqual(set.Speed, speed);
|
||
|
}
|
||
|
|
||
|
[Test]
|
||
|
public void UShortStaticStatisticSet([Random(1)] ushort hp, [Random(1)] ushort attack, [Random(1)] ushort defense,
|
||
|
[Random(1)] ushort specialAttack, [Random(1)] ushort specialDefense, [Random(1)] ushort speed)
|
||
|
{
|
||
|
using var set = new StaticStatisticSet<ushort>(hp, attack, defense, specialAttack, specialDefense, speed);
|
||
|
Assert.AreEqual(set.HP, hp);
|
||
|
Assert.AreEqual(set.Attack, attack);
|
||
|
Assert.AreEqual(set.Defense, defense);
|
||
|
Assert.AreEqual(set.SpecialAttack, specialAttack);
|
||
|
Assert.AreEqual(set.SpecialDefense, specialDefense);
|
||
|
Assert.AreEqual(set.Speed, speed);
|
||
|
}
|
||
|
|
||
|
[Test]
|
||
|
public void UintStaticStatisticSet([Random(1)] uint hp, [Random(1)] uint attack, [Random(1)] uint defense,
|
||
|
[Random(1)] uint specialAttack, [Random(1)] uint specialDefense, [Random(1)] uint speed)
|
||
|
{
|
||
|
using var set = new StaticStatisticSet<uint>(hp, attack, defense, specialAttack, specialDefense, speed);
|
||
|
Assert.AreEqual(set.HP, hp);
|
||
|
Assert.AreEqual(set.Attack, attack);
|
||
|
Assert.AreEqual(set.Defense, defense);
|
||
|
Assert.AreEqual(set.SpecialAttack, specialAttack);
|
||
|
Assert.AreEqual(set.SpecialDefense, specialDefense);
|
||
|
Assert.AreEqual(set.Speed, speed);
|
||
|
}
|
||
|
|
||
|
[Test]
|
||
|
public void SbyteStaticStatisticSet([Random(1)] sbyte hp, [Random(1)] sbyte attack, [Random(1)] sbyte defense,
|
||
|
[Random(1)] sbyte specialAttack, [Random(1)] sbyte specialDefense, [Random(1)] sbyte speed)
|
||
|
{
|
||
|
using var set = new StaticStatisticSet<sbyte>(hp, attack, defense, specialAttack, specialDefense, speed);
|
||
|
Assert.AreEqual(set.HP, hp);
|
||
|
Assert.AreEqual(set.Attack, attack);
|
||
|
Assert.AreEqual(set.Defense, defense);
|
||
|
Assert.AreEqual(set.SpecialAttack, specialAttack);
|
||
|
Assert.AreEqual(set.SpecialDefense, specialDefense);
|
||
|
Assert.AreEqual(set.Speed, speed);
|
||
|
}
|
||
|
|
||
|
[Test]
|
||
|
public void ShortStaticStatisticSet([Random(1)] short hp, [Random(1)] short attack, [Random(1)] short defense,
|
||
|
[Random(1)] short specialAttack, [Random(1)] short specialDefense, [Random(1)] short speed)
|
||
|
{
|
||
|
using var set = new StaticStatisticSet<short>(hp, attack, defense, specialAttack, specialDefense, speed);
|
||
|
Assert.AreEqual(set.HP, hp);
|
||
|
Assert.AreEqual(set.Attack, attack);
|
||
|
Assert.AreEqual(set.Defense, defense);
|
||
|
Assert.AreEqual(set.SpecialAttack, specialAttack);
|
||
|
Assert.AreEqual(set.SpecialDefense, specialDefense);
|
||
|
Assert.AreEqual(set.Speed, speed);
|
||
|
}
|
||
|
|
||
|
[Test]
|
||
|
public void IntStaticStatisticSet([Random(1)] int hp, [Random(1)] int attack, [Random(1)] int defense,
|
||
|
[Random(1)] int specialAttack, [Random(1)] int specialDefense, [Random(1)] int speed)
|
||
|
{
|
||
|
using var set = new StaticStatisticSet<int>(hp, attack, defense, specialAttack, specialDefense, speed);
|
||
|
Assert.AreEqual(set.HP, hp);
|
||
|
Assert.AreEqual(set.Attack, attack);
|
||
|
Assert.AreEqual(set.Defense, defense);
|
||
|
Assert.AreEqual(set.SpecialAttack, specialAttack);
|
||
|
Assert.AreEqual(set.SpecialDefense, specialDefense);
|
||
|
Assert.AreEqual(set.Speed, speed);
|
||
|
}
|
||
|
}
|
||
|
}
|