< Summary - Combined Code Coverage

Information
Class: NLightning.Daemon.Services.Ipc.Factories.IpcErrorFactory
Assembly: NLightning.Daemon
File(s): /home/runner/work/NLightning/NLightning/src/NLightning.Daemon/Services/Ipc/Factories/IpcErrorFactory.cs
Tag: 57_24045730253
Line coverage
0%
Covered lines: 0
Uncovered lines: 9
Coverable lines: 9
Total lines: 21
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
CreateErrorEnvelope(...)100%210%

File(s)

/home/runner/work/NLightning/NLightning/src/NLightning.Daemon/Services/Ipc/Factories/IpcErrorFactory.cs

#LineLine coverage
 1using MessagePack;
 2
 3namespace NLightning.Daemon.Services.Ipc.Factories;
 4
 5using Transport.Ipc;
 6
 7public static class IpcErrorFactory
 8{
 9    public static IpcEnvelope CreateErrorEnvelope(IpcEnvelope originalEnvelope, string errorCode, string errorMessage)
 10    {
 011        var payload = MessagePackSerializer.Serialize(new IpcError { Code = errorCode, Message = errorMessage });
 012        return new IpcEnvelope
 013        {
 014            Version = originalEnvelope.Version,
 015            Command = originalEnvelope.Command,
 016            CorrelationId = originalEnvelope.CorrelationId,
 017            Kind = IpcEnvelopeKind.Error,
 018            Payload = payload
 019        };
 20    }
 21}