100 lines
3.5 KiB
C#
100 lines
3.5 KiB
C#
using NUnit.Framework;
|
|
using PkmnLibSharp.Library;
|
|
|
|
namespace PkmnLibSharpTests.Library
|
|
{
|
|
public class FormeTests
|
|
{
|
|
[Test]
|
|
public void ConstructDestruct()
|
|
{
|
|
var forme = Forme.Create("foo", 1, 2, 100, new byte[] {0}, 10, 10, 10, 10, 10, 10, new[] {"foo"},
|
|
new[] {"bar"}, LearnableMoves.Create(100));
|
|
forme.Dispose();
|
|
}
|
|
|
|
[Test]
|
|
public void GetName()
|
|
{
|
|
var forme = Forme.Create("foo", 1, 2, 100, new byte[] {0}, 10, 10, 10, 10, 10, 10, new[] {"foo"},
|
|
new[] {"bar"}, LearnableMoves.Create(100));
|
|
Assert.AreEqual("foo", forme.Name);
|
|
forme.Dispose();
|
|
}
|
|
|
|
[Test]
|
|
public void GetHeight()
|
|
{
|
|
var forme = Forme.Create("foo", 1, 2, 100, new byte[] {0}, 10, 10, 10, 10, 10, 10, new[] {"foo"},
|
|
new[] {"bar"}, LearnableMoves.Create(100));
|
|
Assert.AreEqual(1f, forme.Height);
|
|
forme.Dispose();
|
|
}
|
|
|
|
[Test]
|
|
public void GetWeight()
|
|
{
|
|
var forme = Forme.Create("foo", 1, 2, 100, new byte[] {0}, 10, 10, 10, 10, 10, 10, new[] {"foo"},
|
|
new[] {"bar"}, LearnableMoves.Create(100));
|
|
Assert.AreEqual(2f, forme.Weight);
|
|
forme.Dispose();
|
|
}
|
|
|
|
[Test]
|
|
public void GetBaseExperience()
|
|
{
|
|
var forme = Forme.Create("foo", 1, 2, 100, new byte[] {0}, 10, 10, 10, 10, 10, 10, new[] {"foo"},
|
|
new[] {"bar"}, LearnableMoves.Create(100));
|
|
Assert.AreEqual(100, forme.BaseExperience);
|
|
forme.Dispose();
|
|
}
|
|
|
|
[Test]
|
|
public void GetTypes()
|
|
{
|
|
var forme = Forme.Create("foo", 1, 2, 100, new byte[] {0}, 10, 10, 10, 10, 10, 10, new[] {"foo"},
|
|
new[] {"bar"}, LearnableMoves.Create(100));
|
|
Assert.AreEqual(0, forme.GetPkmnType(0));
|
|
forme.Dispose();
|
|
|
|
forme = Forme.Create("foo", 1, 2, 100, new byte[] {0, 1}, 10, 10, 10, 10, 10, 10, new[] {"foo"},
|
|
new[] {"bar"}, LearnableMoves.Create(100));
|
|
Assert.AreEqual(0, forme.GetPkmnType(0));
|
|
Assert.AreEqual(1, forme.GetPkmnType(1));
|
|
forme.Dispose();
|
|
}
|
|
|
|
[Test]
|
|
public void GetStats()
|
|
{
|
|
var forme = Forme.Create("foo", 1, 2, 100, new byte[] {0}, 10, 20, 30, 40, 50, 60, new[] {"foo"},
|
|
new[] {"bar"}, LearnableMoves.Create(100));
|
|
Assert.AreEqual(10, forme.BaseHealth);
|
|
Assert.AreEqual(20, forme.BaseAttack);
|
|
Assert.AreEqual(30, forme.BaseDefense);
|
|
Assert.AreEqual(40, forme.BaseSpecialAttack);
|
|
Assert.AreEqual(50, forme.BaseSpecialDefense);
|
|
Assert.AreEqual(60, forme.BaseSpeed);
|
|
forme.Dispose();
|
|
}
|
|
|
|
[Test]
|
|
public void GetAbilities()
|
|
{
|
|
var forme = Forme.Create("foo", 1, 2, 100, new byte[] {0}, 10, 10, 10, 10, 10, 10, new[] {"foo"},
|
|
new[] {"bar"}, LearnableMoves.Create(100));
|
|
Assert.AreEqual("foo", forme.Abilities[0]);
|
|
forme.Dispose();
|
|
}
|
|
|
|
[Test]
|
|
public void GetHiddenAbilities()
|
|
{
|
|
var forme = Forme.Create("foo", 1, 2, 100, new byte[] {0}, 10, 10, 10, 10, 10, 10, new[] {"foo"},
|
|
new[] {"bar"}, LearnableMoves.Create(100));
|
|
Assert.AreEqual("bar", forme.HiddenAbilities[0]);
|
|
forme.Dispose();
|
|
}
|
|
|
|
}
|
|
} |