mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-08-28 13:26:30 -05:00
Add showdownset parse case template test
This commit is contained in:
@@ -188,7 +188,8 @@ private string GetText()
|
||||
// Secondary Stats
|
||||
if (Ability > -1 && Ability < abilities.Length)
|
||||
result.Add($"Ability: {abilities[Ability]}");
|
||||
result.Add($"Level: {Level}");
|
||||
if (Level != 100)
|
||||
result.Add($"Level: {Level}");
|
||||
if (Shiny)
|
||||
result.Add("Shiny: Yes");
|
||||
|
||||
|
||||
@@ -14,9 +14,12 @@ public class ShowdownSetTests
|
||||
[TestCategory(SimulatorParse)]
|
||||
public void SimulatorGetParse()
|
||||
{
|
||||
var set = new ShowdownSet(SetGlaceonUSUMTutor);
|
||||
string Sanitize(string str) => str.Replace("\r\n", "").Replace("\n", "");
|
||||
Assert.IsTrue(Sanitize(SetGlaceonUSUMTutor) == Sanitize(set.Text));
|
||||
foreach (var setstr in Sets)
|
||||
{
|
||||
var set = new ShowdownSet(setstr).Text;
|
||||
var lines = set.Split('\n').Select(z => z.Trim());
|
||||
Assert.IsTrue(lines.All(z => setstr.Contains(z)), setstr);
|
||||
}
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
@@ -84,5 +87,18 @@ Modest Nature
|
||||
- Shadow Ball
|
||||
- Hyper Voice";
|
||||
|
||||
private static readonly string[] Sets =
|
||||
{
|
||||
SetGlaceonUSUMTutor,
|
||||
|
||||
@"Greninja @ Choice Specs
|
||||
Ability: Battle Bond
|
||||
EVs: 252 SpA / 4 SpD / 252 Spe
|
||||
Timid Nature
|
||||
- Hydro Pump
|
||||
- Spikes
|
||||
- Water Shuriken
|
||||
- Dark Pulse",
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user