< Summary

Class:DCL.DataStore_Notifications
Assembly:DataStore
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/DataStore/DataStore_Notifications.cs
Covered lines:2
Uncovered lines:0
Coverable lines:2
Total lines:49
Line coverage:100% (2 of 2)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
DataStore_Notifications()0%110100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/DataStore/DataStore_Notifications.cs

#LineLine coverage
 1using System;
 2
 3namespace DCL
 4{
 5    public record GenericConfirmationNotificationData
 6    {
 7        public readonly string Title;
 8        public readonly string Body;
 9        public readonly string CancelButton;
 10        public readonly string ConfirmButton;
 11        public readonly Action CancelAction;
 12        public readonly Action ConfirmAction;
 13
 14        public GenericConfirmationNotificationData(string title, string body, string cancelButton, string confirmButton,
 15            Action cancelAction, Action confirmAction)
 16        {
 17            Title = title;
 18            Body = body;
 19            CancelButton = cancelButton;
 20            ConfirmButton = confirmButton;
 21            CancelAction = cancelAction;
 22            ConfirmAction = confirmAction;
 23        }
 24
 25        public static GenericConfirmationNotificationData CreateUnFriendData(string userName, Action confirmationAction)
 26            new (
 27                $"Are you sure you want to unfriend {userName}?",
 28                "This player and you will no longer be friends, meaning you won't be able to send each other private mes
 29                "CANCEL",
 30                "UNFRIEND",
 31                null,
 32                confirmationAction);
 33
 34        public static GenericConfirmationNotificationData CreateBlockUserData(string userName, Action confirmationAction
 35            new (
 36                $"Are you sure you want to block {userName}?",
 37                "Blocking will prevent you from seeing their chat messages in public or private conversations.",
 38                "CANCEL",
 39                "BLOCK",
 40                null,
 41                confirmationAction);
 42    }
 43
 44    public class DataStore_Notifications
 45    {
 646        public readonly BaseVariable<string> DefaultErrorNotification = new ();
 647        public readonly BaseVariable<GenericConfirmationNotificationData> GenericConfirmation = new ();
 48    }
 49}

Methods/Properties

DataStore_Notifications()