< Summary

Information
Class: Pomodoro.Web.App
Assembly: Pomodoro.Web
File(s): /home/runner/work/Pomodoro/Pomodoro/src/Pomodoro.Web/App.razor
Line coverage
100%
Covered lines: 13
Uncovered lines: 0
Coverable lines: 13
Total lines: 41
Line coverage: 100%
Branch coverage
100%
Covered branches: 2
Total branches: 2
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
GetNotFoundPageTitle()100%11100%
RecoverError()100%22100%

File(s)

/home/runner/work/Pomodoro/Pomodoro/src/Pomodoro.Web/App.razor

#LineLine coverage
 1@using Pomodoro.Web.Components
 2
 3<Router AppAssembly="@typeof(App).Assembly">
 4    <Found Context="routeData">
 415        <ErrorBoundary @ref="_errorBoundary">
 416            <ChildContent>
 417                <RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
 418                <FocusOnNavigate RouteData="@routeData" Selector="h1" />
 419            </ChildContent>
 4110            <ErrorContent Context="exception">
 11                <ErrorDisplay Exception="exception" OnRetry="RecoverError" />
 12            </ErrorContent>
 13        </ErrorBoundary>
 14    </Found>
 15    <NotFound>
 16        <CustomPageTitle Value="@GetNotFoundPageTitle()" />
 17        <LayoutView Layout="@typeof(MainLayout)">
 2018            <p role="alert">@Constants.Routing.NotFoundMessage</p>
 19        </LayoutView>
 20    </NotFound>
 21</Router>
 22
 23@code {
 24    private ErrorBoundary? _errorBoundary;
 25
 26    /// <summary>
 27    /// Gets the page title for the NotFound page
 28    /// </summary>
 29    public string GetNotFoundPageTitle()
 3430    {
 3431        return Constants.Routing.NotFoundPageTitle;
 3432    }
 33
 34    /// <summary>
 35    /// Recovers from an error by resetting the ErrorBoundary
 36    /// </summary>
 37    public void RecoverError()
 1638    {
 1639        _errorBoundary?.Recover();
 1640    }
 41}