feat: align legacy operator and playout behavior
This commit is contained in:
@@ -15,6 +15,33 @@ public sealed class PlayoutSceneCompositionFactoryTests
|
||||
Assert.Null(result.BackgroundAssetPath);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(0)]
|
||||
[InlineData(6)]
|
||||
[InlineData(19)]
|
||||
public void Fade_AcceptsOriginalDissolveComboIndexRange(int fadeDuration)
|
||||
{
|
||||
var result = PlayoutSceneCompositionFactory.Create(new PlayoutOptions
|
||||
{
|
||||
LegacySceneFadeDuration = fadeDuration
|
||||
});
|
||||
|
||||
Assert.Equal(fadeDuration, result.FadeDuration);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(-1)]
|
||||
[InlineData(20)]
|
||||
[InlineData(60)]
|
||||
public void Fade_RejectsValuesOutsideOriginalDissolveComboIndexRange(int fadeDuration)
|
||||
{
|
||||
Assert.Throws<PlayoutConfigurationException>(() =>
|
||||
PlayoutSceneCompositionFactory.Create(new PlayoutOptions
|
||||
{
|
||||
LegacySceneFadeDuration = fadeDuration
|
||||
}));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TrustedRelativeVideo_IsVerifiedEvenInDryRun()
|
||||
{
|
||||
@@ -92,4 +119,44 @@ public sealed class PlayoutSceneCompositionFactoryTests
|
||||
new PlayoutOptions { SceneDirectory = scenes.Path },
|
||||
fadeDuration: 6));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void LegacyStartupDefault_UsesCutsVideo_NotSiblingBackgroundRoot()
|
||||
{
|
||||
using var scenes = TemporarySceneDirectory.Create(
|
||||
"5001.t2s",
|
||||
PlayoutSceneCompositionFactory.LegacyStartupDefaultBackgroundAssetPath);
|
||||
var backgroundRoot = Path.Combine(Directory.GetParent(scenes.Path)!.FullName, "배경");
|
||||
Directory.CreateDirectory(backgroundRoot);
|
||||
File.WriteAllText(
|
||||
Path.Combine(
|
||||
backgroundRoot,
|
||||
PlayoutSceneCompositionFactory.LegacyDefaultBackgroundFileName),
|
||||
"trusted F2/F3 background");
|
||||
|
||||
var result = PlayoutSceneCompositionFactory.CreateLegacyStartupDefault(
|
||||
new PlayoutOptions { SceneDirectory = scenes.Path },
|
||||
fadeDuration: 6);
|
||||
|
||||
Assert.Equal(@"video\기본.vrv", result.BackgroundAssetPath);
|
||||
Assert.Equal(PlayoutAssetRoot.SceneDirectory, result.BackgroundAssetRoot);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void LegacyStartupDefault_MissingCutsVideo_FailsEvenWhenSiblingDefaultExists()
|
||||
{
|
||||
using var scenes = TemporarySceneDirectory.Create("5001.t2s");
|
||||
var backgroundRoot = Path.Combine(Directory.GetParent(scenes.Path)!.FullName, "배경");
|
||||
Directory.CreateDirectory(backgroundRoot);
|
||||
File.WriteAllText(
|
||||
Path.Combine(
|
||||
backgroundRoot,
|
||||
PlayoutSceneCompositionFactory.LegacyDefaultBackgroundFileName),
|
||||
"trusted F2/F3 background");
|
||||
|
||||
Assert.Throws<PlayoutConfigurationException>(() =>
|
||||
PlayoutSceneCompositionFactory.CreateLegacyStartupDefault(
|
||||
new PlayoutOptions { SceneDirectory = scenes.Path },
|
||||
fadeDuration: 6));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user