Files
Print_server/Inspectron.Epson.Tests/Telemetry/InsinEventKindsTests.cs
2026-07-23 07:46:44 +00:00

29 lines
1.1 KiB
C#

using Inspectron.Epson.PrintServer.Telemetry;
using Inspectron.Epson.Queue;
namespace Inspectron.Epson.Tests.Telemetry;
public class InsinEventKindsTests
{
[Theory]
[InlineData(PrintErrorType.OutOfPaper, "job.failed.paper_out")]
[InlineData(PrintErrorType.Offline, "job.failed.connection")]
[InlineData(PrintErrorType.ConversionError, "job.failed.other")]
[InlineData(PrintErrorType.Other, "job.failed.other")]
[InlineData(PrintErrorType.None, "job.failed.other")]
public void MapErrorTypeToKind(PrintErrorType input, string expected)
{
Assert.Equal(expected, InsinEventKinds.MapErrorTypeToKind(input));
}
[Fact]
public void Constants_have_expected_values()
{
Assert.Equal("service.started", InsinEventKinds.ServiceStarted);
Assert.Equal("job.printed", InsinEventKinds.JobPrinted);
Assert.Equal("printer.discovered", InsinEventKinds.PrinterDiscovered);
Assert.Equal("printer.online", InsinEventKinds.PrinterOnline);
Assert.Equal("printer.offline", InsinEventKinds.PrinterOffline);
}
}