Initial commit, implements Forme

This commit is contained in:
2020-05-02 19:54:07 +02:00
commit 35388de524
132 changed files with 6586 additions and 0 deletions

View File

@@ -0,0 +1,69 @@
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();
}
}
}

View File

@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="nunit" Version="3.12.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.15.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PkmnLibSharp\PkmnLibSharp.csproj" />
</ItemGroup>
</Project>