add selftest

This commit is contained in:
pohky 2021-12-09 17:25:41 +01:00
parent d78d88e089
commit 10962c8974
2 changed files with 49 additions and 0 deletions

View file

@ -0,0 +1,48 @@
using Dalamud.Game.ClientState.Aetherytes;
using Dalamud.Utility;
using ImGuiNET;
namespace Dalamud.Interface.Internal.Windows.SelfTest.AgingSteps
{
/// <summary>
/// Test setup for the Aetheryte List.
/// </summary>
internal class AetheryteListAgingStep : IAgingStep
{
private int index = 0;
/// <inheritdoc/>
public string Name => "Test AetheryteList";
/// <inheritdoc/>
public SelfTestStepResult RunStep()
{
var list = Service<AetheryteList>.Get();
ImGui.Text("Checking aetheryte list...");
if (this.index == list.Length - 1)
{
return SelfTestStepResult.Pass;
}
var aetheryte = list[this.index];
this.index++;
if (aetheryte == null)
{
return SelfTestStepResult.Waiting;
}
Util.ShowObject(aetheryte);
return SelfTestStepResult.Waiting;
}
/// <inheritdoc/>
public void CleanUp()
{
// ignored
}
}
}

View file

@ -28,6 +28,7 @@ namespace Dalamud.Interface.Internal.Windows.SelfTest
new EnterTerritoryAgingStep(148, "Central Shroud"), new EnterTerritoryAgingStep(148, "Central Shroud"),
new ActorTableAgingStep(), new ActorTableAgingStep(),
new FateTableAgingStep(), new FateTableAgingStep(),
new AetheryteListAgingStep(),
new ConditionAgingStep(), new ConditionAgingStep(),
new ToastAgingStep(), new ToastAgingStep(),
new TargetAgingStep(), new TargetAgingStep(),