< Summary

Information
Class: Pomodoro.Web.Services.ConsentOption
Assembly: Pomodoro.Web
File(s): /home/runner/work/Pomodoro/Pomodoro/src/Pomodoro.Web/Services/IConsentService.cs
Line coverage
100%
Covered lines: 4
Uncovered lines: 0
Coverable lines: 4
Total lines: 36
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
get_SessionType()100%11100%
get_Label()100%11100%
get_Duration()100%11100%
get_IsDefault()100%11100%

File(s)

/home/runner/work/Pomodoro/Pomodoro/src/Pomodoro.Web/Services/IConsentService.cs

#LineLine coverage
 1using Pomodoro.Web.Models;
 2
 3namespace Pomodoro.Web.Services;
 4
 5/// <summary>
 6/// Interface for consent modal operations
 7/// </summary>
 8public interface IConsentService
 9{
 10    event Action? OnConsentRequired;
 11    event Action? OnCountdownTick;
 12    event Action? OnConsentHandled;
 13
 14    bool IsModalVisible { get; }
 15    SessionType CompletedSessionType { get; }
 16    int CountdownSeconds { get; }
 17    List<ConsentOption> AvailableOptions { get; }
 18
 19    void Initialize();
 20    void ShowConsentModal(SessionType completedSessionType);
 21    void HideConsentModal();
 22    void RefreshOptions();
 23    Task SelectOptionAsync(SessionType nextSessionType);
 24    Task HandleTimeoutAsync();
 25}
 26
 27/// <summary>
 28/// Represents an option in the consent modal
 29/// </summary>
 30public class ConsentOption
 31{
 44532    public SessionType SessionType { get; set; }
 81933    public string Label { get; set; } = string.Empty;
 81634    public string Duration { get; set; } = string.Empty;
 40235    public bool IsDefault { get; set; }
 36}