PkmnLibSharp/PkmnLibSharpTests/FormeTests.cs

69 lines
2.1 KiB
C#
Raw Normal View History

2020-05-02 17:54:07 +00:00
using NUnit.Framework;
using PkmnLibSharp.Library;
namespace PkmnLibSharpTests
{
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"});
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"});
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"});
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"});
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"});
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"});
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"});
Assert.AreEqual(0, forme.GetPkmnType(0));
Assert.AreEqual(1, forme.GetPkmnType(1));
forme.Dispose();
}
}
}