< Summary

Information
Class: Application.service.CustomerService
Assembly: Application
File(s): /home/runner/work/Northwind-Api/Northwind-Api/src/Application/Service/CustomerService.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/CustomerService.cs

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