fix: apply direct runtime paths and respect taskbar
This commit is contained in:
@@ -163,6 +163,49 @@ public sealed class PlayoutOptionsLoaderTests
|
||||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void LoadDevelopmentLive_UsesTheFirstRunCutsPathWithoutCopyingIt()
|
||||
{
|
||||
using var environment = ClearedEnvironment()
|
||||
.Set("MBN_STOCK_PLAYOUT_SCENE_DIRECTORY", "C:\\stale-scenes");
|
||||
using var file = TemporaryJsonFile.Create(DevelopmentLiveBaseJson());
|
||||
var executableRoot = Path.Combine(
|
||||
Path.GetTempPath(),
|
||||
Guid.NewGuid().ToString("N"),
|
||||
"app");
|
||||
var selectedCuts = Path.Combine(
|
||||
Path.GetTempPath(),
|
||||
Guid.NewGuid().ToString("N"),
|
||||
"Cuts");
|
||||
Directory.CreateDirectory(executableRoot);
|
||||
Directory.CreateDirectory(selectedCuts);
|
||||
try
|
||||
{
|
||||
var options = PlayoutOptionsLoader.LoadDevelopmentLive(
|
||||
file.Path,
|
||||
executableRoot,
|
||||
selectedCuts);
|
||||
|
||||
Assert.Equal(Path.GetFullPath(selectedCuts), options.SceneDirectory);
|
||||
Assert.Equal(
|
||||
Path.GetFullPath(selectedCuts),
|
||||
options.DevelopmentLiveExecutableSceneDirectory);
|
||||
Assert.False(Directory.Exists(Path.Combine(executableRoot, "Cuts")));
|
||||
|
||||
var validated = ValidatedPlayoutOptions.Create(options);
|
||||
Assert.Equal(Path.GetFullPath(selectedCuts), validated.SceneDirectory);
|
||||
}
|
||||
finally
|
||||
{
|
||||
Directory.Delete(
|
||||
Path.GetDirectoryName(executableRoot)!,
|
||||
recursive: true);
|
||||
Directory.Delete(
|
||||
Path.GetDirectoryName(selectedCuts)!,
|
||||
recursive: true);
|
||||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void LoadDevelopmentLive_RejectsBaseProfileThatCanReconnect()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user