feat: Add asset loading functionality and related tests for improved resource management

This commit is contained in:
Neil Dorin 2026-04-09 14:00:27 -06:00
parent 4ed5e648c0
commit b85f1dab6b
8 changed files with 733 additions and 197 deletions

View file

@ -0,0 +1,28 @@
using System.Runtime.CompilerServices;
using PepperDash.Core.Abstractions;
using PepperDash.Essentials.Tests.Fakes;
namespace PepperDash.Essentials.Tests;
/// <summary>
/// Runs once before any type in this assembly is accessed.
/// Registers fake Crestron service implementations so that the <c>Debug</c> static
/// constructor never tries to reach the real Crestron SDK.
/// </summary>
internal static class TestInitializer
{
[ModuleInitializer]
internal static void Initialize()
{
DebugServiceRegistration.Register(
new FakeCrestronEnvironment
{
DevicePlatform = DevicePlatform.Server,
RuntimeEnvironment = RuntimeEnvironment.Other,
},
new NoOpCrestronConsole(),
new InMemoryCrestronDataStore());
}
}