feat: migrate legacy playout workflow and scenes

This commit is contained in:
2026-07-10 23:58:45 +09:00
parent 491a740505
commit 8dae7b8e0d
128 changed files with 39177 additions and 205 deletions

View File

@@ -1,3 +1,5 @@
using MBN_STOCK_WEBVIEW.Core.Playout.Scenes;
namespace MBN_STOCK_WEBVIEW.Playout.Tests;
public sealed class PlayoutOptionsLoaderTests
@@ -11,6 +13,11 @@ public sealed class PlayoutOptionsLoaderTests
"MBN_STOCK_PLAYOUT_CLIENT_PORT",
"MBN_STOCK_PLAYOUT_OUTPUT_CHANNEL",
"MBN_STOCK_PLAYOUT_LAYOUT_INDEX",
"MBN_STOCK_PLAYOUT_LEGACY_FADE_DURATION",
"MBN_STOCK_PLAYOUT_LEGACY_BACKGROUND_KIND",
"MBN_STOCK_PLAYOUT_LEGACY_BACKGROUND_ASSET",
"MBN_STOCK_PLAYOUT_LEGACY_BACKGROUND_VIDEO_LOOP_COUNT",
"MBN_STOCK_PLAYOUT_LEGACY_BACKGROUND_VIDEO_LOOP_INFINITE",
"MBN_STOCK_PLAYOUT_SCENE_DIRECTORY",
"MBN_STOCK_PLAYOUT_TEST_WINDOW_TITLE_PATTERN",
"MBN_STOCK_PLAYOUT_QUEUE_CAPACITY",
@@ -41,6 +48,11 @@ public sealed class PlayoutOptionsLoaderTests
Assert.Equal(0, options.ClientPort);
Assert.Null(options.OutputChannel);
Assert.Null(options.SceneDirectory);
Assert.Equal(6, options.LegacySceneFadeDuration);
Assert.Equal(LegacySceneBackgroundKind.None, options.LegacySceneBackgroundKind);
Assert.Null(options.LegacySceneBackgroundAssetPath);
Assert.Equal(2004, options.LegacySceneBackgroundVideoLoopCount);
Assert.True(options.LegacySceneBackgroundVideoLoopInfinite);
Assert.Empty(options.TestSceneAllowlist);
Assert.False(options.TrustedLiveOutputEnabled);
Assert.True(options.ReconnectEnabled);
@@ -57,6 +69,11 @@ public sealed class PlayoutOptionsLoaderTests
.Set("MBN_STOCK_PLAYOUT_CLIENT_PORT", "32002")
.Set("MBN_STOCK_PLAYOUT_OUTPUT_CHANNEL", "12")
.Set("MBN_STOCK_PLAYOUT_LAYOUT_INDEX", "13")
.Set("MBN_STOCK_PLAYOUT_LEGACY_FADE_DURATION", "9")
.Set("MBN_STOCK_PLAYOUT_LEGACY_BACKGROUND_KIND", "Video")
.Set("MBN_STOCK_PLAYOUT_LEGACY_BACKGROUND_ASSET", "Video\\studio.vrv")
.Set("MBN_STOCK_PLAYOUT_LEGACY_BACKGROUND_VIDEO_LOOP_COUNT", "2004")
.Set("MBN_STOCK_PLAYOUT_LEGACY_BACKGROUND_VIDEO_LOOP_INFINITE", "false")
.Set("MBN_STOCK_PLAYOUT_SCENE_DIRECTORY", "C:\\env-scenes")
.Set("MBN_STOCK_PLAYOUT_TEST_WINDOW_TITLE_PATTERN", "ENV TEST")
.Set("MBN_STOCK_PLAYOUT_QUEUE_CAPACITY", "14")
@@ -103,6 +120,11 @@ public sealed class PlayoutOptionsLoaderTests
Assert.Equal(32002, options.ClientPort);
Assert.Equal(12, options.OutputChannel);
Assert.Equal(13, options.LayoutIndex);
Assert.Equal(9, options.LegacySceneFadeDuration);
Assert.Equal(LegacySceneBackgroundKind.Video, options.LegacySceneBackgroundKind);
Assert.Equal("Video\\studio.vrv", options.LegacySceneBackgroundAssetPath);
Assert.Equal(2004, options.LegacySceneBackgroundVideoLoopCount);
Assert.False(options.LegacySceneBackgroundVideoLoopInfinite);
Assert.Equal("C:\\env-scenes", options.SceneDirectory);
Assert.Equal("ENV TEST", options.TestProcessWindowTitlePattern);
Assert.Equal(14, options.QueueCapacity);
@@ -153,6 +175,7 @@ public sealed class PlayoutOptionsLoaderTests
[Theory]
[InlineData("MBN_STOCK_PLAYOUT_MODE", "not-a-mode")]
[InlineData("MBN_STOCK_PLAYOUT_LEGACY_BACKGROUND_KIND", "not-a-background")]
[InlineData("MBN_STOCK_PLAYOUT_PORT", "not-a-number")]
[InlineData("MBN_STOCK_PLAYOUT_RECONNECT_ENABLED", "not-a-bool")]
public void Load_InvalidEnvironmentValue_IdentifiesVariableWithoutLeakingValue(