mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-08-31 19:08:29 +00:00
28 lines
824 B
C#
28 lines
824 B
C#
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());
|
|
}
|
|
}
|
|
|
|
|