< Summary

Information
Class: Services.ChannelTaskServices.ChannelTaskResponses
Assembly: Services
File(s): /home/runner/work/Studio2Prod/Studio2Prod/AppRepository/ChannelTaskServices/ChannelTaskResponses.cs
Line coverage
100%
Covered lines: 25
Uncovered lines: 0
Coverable lines: 25
Total lines: 31
Line coverage: 100%
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
ToStatusResponse(...)100%11100%
ToStartResponse(...)100%11100%

File(s)

/home/runner/work/Studio2Prod/Studio2Prod/AppRepository/ChannelTaskServices/ChannelTaskResponses.cs

#LineLine coverage
 1namespace Services.ChannelTaskServices;
 2
 3public static class ChannelTaskResponses
 4{
 25    public static object ToStatusResponse(ChannelTaskState task) => new
 26    {
 27        success = true,
 28        taskId = task.TaskId,
 29        type = task.Type.ToString(),
 210        reportId = task.ReportId,
 211        status = task.Status,
 212        stage = task.Stage,
 213        message = task.Message,
 214        current = task.Current,
 215        total = task.Total,
 216        percent = task.Percent,
 217        error = task.Error,
 218        fileName = task.FileName,
 219        resultKind = task.ResultKind.ToString()
 220    };
 21
 122    public static object ToStartResponse(ChannelTaskState task) => new
 123    {
 124        success = true,
 125        taskId = task.TaskId,
 126        status = task.Status,
 127        stage = task.Stage,
 128        message = task.Message,
 129        resultKind = task.ResultKind.ToString()
 130    };
 31}