< Summary

Information
Class: event_list.modules.eventlist.services.EventListServices
Assembly: event-list
File(s): /Users/tiagoamaral/Workspace/desafio/event-list-api/Src/Modules/Eventlist/Services/EventListServices.cs
Line coverage
100%
Covered lines: 16
Uncovered lines: 0
Coverable lines: 16
Total lines: 41
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%
CreateAsync()100%11100%
DeleteAsync()100%11100%
GetAll()100%11100%
GetByIdAsync()100%11100%

File(s)

/Users/tiagoamaral/Workspace/desafio/event-list-api/Src/Modules/Eventlist/Services/EventListServices.cs

#LineLine coverage
 1/*
 2* eventListServices.cs
 3* event-list
 4*
 5* Created by Tiago Amaral on 06/09/2025.
 6* Copyright ©2024 Tiago Amaral. All rights reserved.
 7*/
 8
 9using event_list.modules.eventlist.storage;
 10namespace event_list.modules.eventlist.services;
 11public class EventListServices : IEventListServices
 12{
 13
 14    private readonly IEventListDeleteByIdentifierService _deleteService;
 15    private readonly IEventListFetchByIdentifierService _fetchByIdService;
 16    private readonly IEventListFetchService _fetchService;
 17    private readonly IEventListSaveService _saveService;
 18
 1419    public EventListServices(IEventListDeleteByIdentifierService deleteService,
 1420                             IEventListFetchByIdentifierService fetchByIdService,
 1421                             IEventListFetchService fetchService,
 1422                             IEventListSaveService saveService)
 1423    {
 1424        this._deleteService = deleteService;
 1425        this._fetchByIdService = fetchByIdService;
 1426        this._fetchService = fetchService;
 1427        this._saveService = saveService;
 1428    }
 29
 30
 31    public async Task CreateAsync(EventFormDto dto)
 232    {
 233        await this._saveService.Add(dto);
 134    }
 35
 336    public async Task DeleteAsync(Guid id) => await this._deleteService.Delete(id);
 37
 338    public IEnumerable<EventListDto> GetAll() => this._fetchService.Fetch();
 39
 440    public async Task<EventFormDto?> GetByIdAsync(Guid id) => await this._fetchByIdService.Fetch(id);
 41}