Style cleanup
This commit is contained in:
@@ -7,11 +7,8 @@ using JsonSerializer = System.Text.Json.JsonSerializer;
|
||||
|
||||
namespace PkmnLib.Tests.Integration.Models;
|
||||
|
||||
|
||||
[JsonDerivedType(typeof(SetPokemonAction), "setPokemon")]
|
||||
[JsonDerivedType(typeof(SetMoveChoiceAction), "setMoveChoice")]
|
||||
[JsonDerivedType(typeof(SetPassChoiceAction), "setPassChoice")]
|
||||
[JsonDerivedType(typeof(AssertAction), "assert")]
|
||||
[JsonDerivedType(typeof(SetPokemonAction), "setPokemon"), JsonDerivedType(typeof(SetMoveChoiceAction), "setMoveChoice"),
|
||||
JsonDerivedType(typeof(SetPassChoiceAction), "setPassChoice"), JsonDerivedType(typeof(AssertAction), "assert")]
|
||||
public abstract class IntegrationTestAction
|
||||
{
|
||||
public abstract Task Execute(IBattle battle);
|
||||
@@ -36,7 +33,6 @@ public class SetMoveChoiceAction : IntegrationTestAction
|
||||
public string Move { get; set; } = null!;
|
||||
public List<byte> Target { get; set; } = null!;
|
||||
|
||||
|
||||
/// <inheritdoc />
|
||||
public override async Task Execute(IBattle battle)
|
||||
{
|
||||
@@ -73,7 +69,7 @@ public class AssertAction : IntegrationTestAction
|
||||
{
|
||||
var list = battle.Path(Value).ToList();
|
||||
var value = list.Count == 1 ? list[0] : list;
|
||||
|
||||
|
||||
var serialized = JsonSerializer.Serialize(value);
|
||||
await Assert.That(serialized).IsEqualTo(Expected.ToJsonString());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user