mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-08-31 19:08:29 +00:00
feat: Add asset loading functionality and related tests for improved resource management
This commit is contained in:
parent
4ed5e648c0
commit
b85f1dab6b
8 changed files with 733 additions and 197 deletions
28
src/PepperDash.Essentials.Tests/TestInitializer.cs
Normal file
28
src/PepperDash.Essentials.Tests/TestInitializer.cs
Normal 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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue