add IInsinTelemetry and NullInsinTelemetry
This commit is contained in:
14
Inspectron.Epson.Tests/Telemetry/NullInsinTelemetryTests.cs
Normal file
14
Inspectron.Epson.Tests/Telemetry/NullInsinTelemetryTests.cs
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
using Inspectron.Epson.PrintServer.Telemetry;
|
||||||
|
|
||||||
|
namespace Inspectron.Epson.Tests.Telemetry;
|
||||||
|
|
||||||
|
public class NullInsinTelemetryTests
|
||||||
|
{
|
||||||
|
[Fact]
|
||||||
|
public void Emit_does_nothing_and_does_not_throw()
|
||||||
|
{
|
||||||
|
var telemetry = new NullInsinTelemetry();
|
||||||
|
var ex = Record.Exception(() => telemetry.Emit("service.started", "version=1.0.0"));
|
||||||
|
Assert.Null(ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
namespace Inspectron.Epson.PrintServer.Telemetry;
|
||||||
|
|
||||||
|
public interface IInsinTelemetry
|
||||||
|
{
|
||||||
|
void Emit(string kind, string message);
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
namespace Inspectron.Epson.PrintServer.Telemetry;
|
||||||
|
|
||||||
|
public sealed class NullInsinTelemetry : IInsinTelemetry
|
||||||
|
{
|
||||||
|
public void Emit(string kind, string message) { }
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user