PkmnLibSharp/PkmnLibSharpTests/Battling/PokemonBuilderTests.cs

52 lines
1.7 KiB
C#
Raw Normal View History

2020-07-19 10:33:22 +00:00
using NUnit.Framework;
using PkmnLibSharp.Battling;
namespace PkmnLibSharpTests.Battling
{
public class PokemonBuilderTests
{
[Test]
public void SimpleBuildPokemon()
{
var lib = BattleLibraryHelper.GetLibrary();
var pokemon = new PokemonBuilder(lib, "testSpecies", 50)
.Build();
Assert.AreEqual("testSpecies", pokemon.Species.Name);
Assert.AreEqual(50, pokemon.Level);
Assert.AreEqual("default", pokemon.Forme.Name);
}
[Test]
public void BuildPokemonWithNickname()
{
var lib = BattleLibraryHelper.GetLibrary();
var pokemon = new PokemonBuilder(lib, "testSpecies", 50)
.WithNickname("cuteNickname")
.Build();
Assert.AreEqual("cuteNickname", pokemon.Nickname);
}
[Test]
public void BuildPokemonWithGender()
{
var lib = BattleLibraryHelper.GetLibrary();
var pokemon = new PokemonBuilder(lib, "testSpecies", 50)
.WithGender(Gender.Female)
.Build();
Assert.AreEqual(Gender.Female, pokemon.Gender);
}
[Test]
public void BuildPokemonWithMoves()
{
var lib = BattleLibraryHelper.GetLibrary();
var pokemon = new PokemonBuilder(lib, "testSpecies", 50)
.LearnMove("testMove", MoveLearnMethod.Unknown)
.LearnMove("testMove2", MoveLearnMethod.Level)
.Build();
2020-07-25 12:03:05 +00:00
Assert.AreEqual("testMove", pokemon.Moves[0].Move.Name);
Assert.AreEqual("testMove2", pokemon.Moves[1].Move.Name);
}
2020-07-19 10:33:22 +00:00
}
}