Add private files legality test method

Dump your legality files into the legality\private folder, and they'll be checked to ensure they're valid.
This commit is contained in:
Kurt 2021-08-06 13:19:27 -07:00
parent d2d10b445b
commit 754e7ab821
3 changed files with 14 additions and 1 deletions

3
.gitignore vendored
View file

@ -1,3 +1,6 @@
Tests/PKHeX.Core.Tests/Legality/Private/
################# #################
## Eclipse ## Eclipse
################# #################

View file

@ -37,6 +37,15 @@ namespace PKHeX.Tests.Legality
VerifyAll(folder, "Illegal", false); VerifyAll(folder, "Illegal", false);
} }
[Fact]
public void TestPrivateFiles()
{
var folder = TestUtil.GetRepoPath();
folder = Path.Combine(folder, "Legality");
ParseSettings.AllowGBCartEra = true;
VerifyAll(folder, "Private", true);
}
// ReSharper disable once UnusedParameter.Local // ReSharper disable once UnusedParameter.Local
private static void VerifyAll(string folder, string name, bool isValid) private static void VerifyAll(string folder, string name, bool isValid)
{ {

View file

@ -1,8 +1,9 @@
using System; using System;
using FluentAssertions; using FluentAssertions;
using PKHeX.Core;
using Xunit; using Xunit;
namespace PKHeX.Core.Tests.Legality namespace PKHeX.Tests.Legality
{ {
public class RaidTests public class RaidTests
{ {