45 lines
1.1 KiB
C#
45 lines
1.1 KiB
C#
using AibisDream.Utility;
|
|
using NUnit.Framework;
|
|
using Yarn.Unity;
|
|
|
|
namespace AibisDream.SystemEditor.Tests
|
|
{
|
|
public sealed class OptionPromptMetadataTests
|
|
{
|
|
[Test]
|
|
public void IsOptionPromptLine_WithExactMetadata_ReturnsTrue()
|
|
{
|
|
var line = new LocalizedLine
|
|
{
|
|
Metadata = new[] { "line:0123456", YarnUtil.OptionPrompt }
|
|
};
|
|
|
|
Assert.That(line.IsOptionPromptLine(), Is.True);
|
|
}
|
|
|
|
[TestCase("option_prompts")]
|
|
[TestCase("dream_option_prompt")]
|
|
[TestCase("OPTION_PROMPT")]
|
|
public void IsOptionPromptLine_WithSimilarMetadata_ReturnsFalse(string metadata)
|
|
{
|
|
var line = new LocalizedLine
|
|
{
|
|
Metadata = new[] { metadata }
|
|
};
|
|
|
|
Assert.That(line.IsOptionPromptLine(), Is.False);
|
|
}
|
|
|
|
[Test]
|
|
public void IsOptionPromptLine_WithoutMetadata_ReturnsFalse()
|
|
{
|
|
var line = new LocalizedLine
|
|
{
|
|
Metadata = null
|
|
};
|
|
|
|
Assert.That(line.IsOptionPromptLine(), Is.False);
|
|
}
|
|
}
|
|
}
|