2019-03-18 05:19:46 +00:00
|
|
|
|
using System.Linq;
|
|
|
|
|
using FluentAssertions;
|
|
|
|
|
using PKHeX.Core;
|
|
|
|
|
using Xunit;
|
|
|
|
|
|
|
|
|
|
namespace PKHeX.Tests.Legality
|
|
|
|
|
{
|
|
|
|
|
public static class LearnabilityTests
|
|
|
|
|
{
|
|
|
|
|
[Theory]
|
|
|
|
|
[InlineData(nameof(Species.Bulbasaur), "Razor Leaf", "Vine Whip")]
|
|
|
|
|
[InlineData(nameof(Species.Charizard), "Fly")]
|
|
|
|
|
[InlineData(nameof(Species.Mew), "Pound")]
|
|
|
|
|
[InlineData(nameof(Species.Smeargle), "Hyperspace Fury")]
|
|
|
|
|
public static void VerifyCanLearn(string species, params string[] moves)
|
|
|
|
|
{
|
|
|
|
|
var encs = EncounterLearn.GetLearn(species, moves);
|
|
|
|
|
encs.Any().Should().BeTrue($"{species} should be able to learn all moves: {string.Join(", ", moves)}");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Theory]
|
|
|
|
|
[InlineData(nameof(Species.Bulbasaur), "Fly")]
|
|
|
|
|
[InlineData(nameof(Species.Charizard), "Bubble")]
|
|
|
|
|
[InlineData(nameof(Species.Mew), "Struggle")]
|
2019-03-18 07:04:17 +00:00
|
|
|
|
[InlineData(nameof(Species.Smeargle), "Chatter")]
|
2019-03-18 05:19:46 +00:00
|
|
|
|
public static void VerifyCannotLearn(string species, params string[] moves)
|
|
|
|
|
{
|
|
|
|
|
var encs = EncounterLearn.GetLearn(species, moves);
|
|
|
|
|
encs.Any().Should().BeFalse($"{species} should not be able to learn all moves: {string.Join(", ", moves)}");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Theory]
|
|
|
|
|
[InlineData(nameof(Species.Chansey), "Wish")]
|
2019-03-18 07:04:17 +00:00
|
|
|
|
[InlineData("Ho-Oh", "Celebrate")]
|
|
|
|
|
[InlineData(nameof(Species.Pikachu), "Happy Hour")]
|
|
|
|
|
[InlineData(nameof(Species.Rayquaza), "V-Create")]
|
2019-03-18 05:19:46 +00:00
|
|
|
|
public static void VerifyCanLearnSpecial(string species, params string[] moves)
|
|
|
|
|
{
|
|
|
|
|
var encs = EncounterLearn.GetLearn(species, moves);
|
|
|
|
|
encs.Any().Should().BeTrue($"{species} should be able to learn all moves: {string.Join(", ", moves)}");
|
|
|
|
|
}
|
2019-03-19 01:09:48 +00:00
|
|
|
|
|
|
|
|
|
[Theory]
|
|
|
|
|
[InlineData("flaBeBe", "pEtaL Dance")]
|
|
|
|
|
public static void VerifyCanLearnParse(string species, params string[] moves)
|
|
|
|
|
{
|
|
|
|
|
var encs = EncounterLearn.GetLearn(species, moves);
|
|
|
|
|
encs.Any().Should().BeTrue($"{species} should be able to learn all moves: {string.Join(", ", moves)}");
|
|
|
|
|
}
|
2019-03-18 05:19:46 +00:00
|
|
|
|
}
|
|
|
|
|
}
|