mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-12 11:15:08 +00:00
test: add multiple mocks for use with testing project
This commit is contained in:
52
src/CrestronMock/Console.cs
Normal file
52
src/CrestronMock/Console.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Crestron.SimplSharp
|
||||
{
|
||||
public static class ErrorLog
|
||||
{
|
||||
public static void Error(string message, params object[] args)
|
||||
{
|
||||
Console.WriteLine($"[ERROR] {string.Format(message, args)}");
|
||||
}
|
||||
|
||||
public static void Notice(string message, params object[] args)
|
||||
{
|
||||
Console.WriteLine($"[NOTICE] {string.Format(message, args)}");
|
||||
}
|
||||
|
||||
public static void Warn(string message, params object[] args)
|
||||
{
|
||||
Console.WriteLine($"[WARN] {string.Format(message, args)}");
|
||||
}
|
||||
|
||||
public static void Info(string message, params object[] args)
|
||||
{
|
||||
Console.WriteLine($"[INFO] {string.Format(message, args)}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace Crestron.SimplSharp.CrestronDataStore
|
||||
{
|
||||
public static class CrestronDataStoreStatic
|
||||
{
|
||||
public static CDS_ERROR SetLocalStringValue(string key, string value)
|
||||
{
|
||||
return CDS_ERROR.CDS_SUCCESS;
|
||||
}
|
||||
|
||||
public static CDS_ERROR GetLocalStringValue(string key, out string value)
|
||||
{
|
||||
value = "";
|
||||
return CDS_ERROR.CDS_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
public enum CDS_ERROR
|
||||
{
|
||||
CDS_SUCCESS = 0,
|
||||
CDS_ERROR = -1
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user