mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-04 21:47:22 +00:00
Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
32 lines
1008 B
C#
32 lines
1008 B
C#
using AIStudio.Components;
|
|
using AIStudio.Tools;
|
|
|
|
namespace AIStudio.Tests.Components;
|
|
|
|
public sealed class ManagePandocDependencyTests
|
|
{
|
|
[Test]
|
|
public void TheInstallationPromptStaysHiddenWhileAvailabilityIsChecked()
|
|
{
|
|
Assert.That(ManagePandocDependency.ShouldShowInstallationPrompt(null), Is.False);
|
|
}
|
|
|
|
[TestCase(true)]
|
|
[TestCase(false)]
|
|
public void AnAvailableInstallationNeedsNoPrompt(bool isLocal)
|
|
{
|
|
var installation = new PandocInstallation(true, string.Empty, true, "3.7.0.2", isLocal);
|
|
|
|
Assert.That(ManagePandocDependency.ShouldShowInstallationPrompt(installation), Is.False);
|
|
}
|
|
|
|
[TestCase(true)]
|
|
[TestCase(false)]
|
|
public void AnUnavailableOrOutdatedInstallationShowsThePrompt(bool checkWasSuccessful)
|
|
{
|
|
var installation = new PandocInstallation(checkWasSuccessful, "Unavailable", false, string.Empty, false);
|
|
|
|
Assert.That(ManagePandocDependency.ShouldShowInstallationPrompt(installation), Is.True);
|
|
}
|
|
}
|