< Summary

Information
Class: Application.service.EmployeeService
Assembly: Application
File(s): /home/runner/work/Northwind-Api/Northwind-Api/src/Application/Service/EmployeeService.cs
Line coverage
100%
Covered lines: 12
Uncovered lines: 0
Coverable lines: 12
Total lines: 24
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
.ctor(...)100%11100%
FindById()100%11100%
FindAll()100%11100%

File(s)

/home/runner/work/Northwind-Api/Northwind-Api/src/Application/Service/EmployeeService.cs

#LineLine coverage
 1using Infrastructure.Entity;
 2using Infrastructure.Repository;
 3using Microsoft.Extensions.Logging;
 4
 5namespace Application.service;
 6public class EmployeeService {
 7  private readonly ILogger<EmployeeService> _logger;
 8  private readonly NorthwindRepository _repository;
 9
 410  public EmployeeService(ILogger<EmployeeService> logger, NorthwindRepository repository) {
 211    _logger = logger;
 212    _repository = repository;
 213  }
 14
 115  public async Task<employee?> FindById(short id, CancellationToken ct) {
 116    _logger.LogTrace("");
 117    return await _repository.FetchEmployeeById(id, ct);
 118  }
 19
 120  public async Task<employee[]> FindAll(CancellationToken ct) {
 121    _logger.LogTrace("");
 122    return await _repository.FetchEmployees(ct);
 123  }
 24}