using NUnit.Framework; using PkmnLibSharp.StaticData; namespace PkmnLibRSharpTests.StaticData { public class StatisticSetTests { [Test] public void ByteStatisticSet([Random(1)] byte hp, [Random(1)] byte attack, [Random(1)] byte defense, [Random(1)] byte specialAttack, [Random(1)] byte specialDefense, [Random(1)] byte speed) { var set = StatisticSet.Create(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 ByteStatisticSetModifying([Random(1)] byte hp, [Random(1)] byte attack, [Random(1)] byte defense, [Random(1)] byte specialAttack, [Random(1)] byte specialDefense, [Random(1)] byte speed) { var set = StatisticSet.Create(0,0,0,0,0,0); set.HP = hp; Assert.AreEqual(set.HP, hp); set.Attack = attack; Assert.AreEqual(set.Attack, attack); set.Defense = defense; Assert.AreEqual(set.Defense, defense); set.SpecialAttack = specialAttack; Assert.AreEqual(set.SpecialAttack, specialAttack); set.SpecialDefense = specialDefense; Assert.AreEqual(set.SpecialDefense, specialDefense); set.Speed = speed; Assert.AreEqual(set.Speed, speed); } [Test] public void UintStatisticSet([Random(1)] uint hp, [Random(1)] uint attack, [Random(1)] uint defense, [Random(1)] uint specialAttack, [Random(1)] uint specialDefense, [Random(1)] uint speed) { var set = StatisticSet.Create(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 SbyteStatisticSet([Random(1)] sbyte hp, [Random(1)] sbyte attack, [Random(1)] sbyte defense, [Random(1)] sbyte specialAttack, [Random(1)] sbyte specialDefense, [Random(1)] sbyte speed) { var set = StatisticSet.Create(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); } } }