38 lines
1.2 KiB
C#
38 lines
1.2 KiB
C#
using Dalamud.Bindings.ImGui;
|
|
using Dalamud.Plugin.SelfTest;
|
|
|
|
namespace HellionChat.SelfTests;
|
|
|
|
// ChunkRenderer is a plain singleton (PluginHostFactory.cs:247) consumed by the
|
|
// real render path (MainWindow/MessageList/InputPreview DrawChunks). One
|
|
// resolution path is enough — unlike PayloadHandler there is no Lender. The
|
|
// type exposes no post-ctor observables (no LoadException-style state), so the
|
|
// honest assertion is "the DI ctor resolved a non-null instance". If a
|
|
// dependency registration breaks, Plugin's eager resolve throws before this
|
|
// step; the step pins that the singleton is reachable through the real
|
|
// container property, not via new().
|
|
internal sealed class ChunkRendererCtorSmokeStep : ISelfTestStep
|
|
{
|
|
private readonly Plugin plugin;
|
|
|
|
public ChunkRendererCtorSmokeStep(Plugin plugin)
|
|
{
|
|
this.plugin = plugin;
|
|
}
|
|
|
|
public string Name => "Hellion Chat - ChunkRenderer ctor smoke";
|
|
|
|
public SelfTestStepResult RunStep()
|
|
{
|
|
if (this.plugin.ChunkRenderer is null)
|
|
{
|
|
ImGui.Text("Plugin.ChunkRenderer is null");
|
|
return SelfTestStepResult.Fail;
|
|
}
|
|
|
|
return SelfTestStepResult.Pass;
|
|
}
|
|
|
|
public void CleanUp() { }
|
|
}
|