< Summary

Information
Class: MyNet.UI.Notifications.Processors.EmptyNotificationFilter
Assembly: MyNet.UI
File(s): https://raw.githubusercontent.com/sandre58/MyNet/85372080fe102cd9ee155ceab49ae000e7f66103/src/MyNet.UI/Notifications/Processors/EmptyNotificationFilter.cs
Tag: 323_28699572109
Line coverage
100%
Covered lines: 3
Uncovered lines: 0
Coverable lines: 3
Total lines: 22
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
Process(...)100%22100%

File(s)

https://raw.githubusercontent.com/sandre58/MyNet/85372080fe102cd9ee155ceab49ae000e7f66103/src/MyNet.UI/Notifications/Processors/EmptyNotificationFilter.cs

#LineLine coverage
 1// -----------------------------------------------------------------------
 2// <copyright file="EmptyNotificationFilter.cs" company="Stéphane ANDRE">
 3// Copyright (c) Stéphane ANDRE. All rights reserved.
 4// </copyright>
 5// -----------------------------------------------------------------------
 6
 7using MyNet.UI.Notifications.Models;
 8
 9namespace MyNet.UI.Notifications.Processors;
 10
 11/// <summary>
 12/// Implements a notification processor that filters out notifications with empty or whitespace-only messages, returning
 13/// </summary>
 14public sealed class EmptyNotificationFilter : INotificationProcessor
 15{
 16    /// <inheritdoc />
 17    public INotification? Process(INotification notification) =>
 618        string.IsNullOrWhiteSpace(notification.Message)
 619            ? null
 620            : notification;
 21}
 22