< 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:58
Line coverage:100% (2 of 2)
Covered branches:0
Total branches:0
Covered methods:1
Total methods:1
Method coverage:100% (1 of 1)

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 someone means that you will no longer see their avatar in-world. Both of you will also not see
 38                "CANCEL",
 39                "BLOCK",
 40                null,
 41                confirmationAction);
 42
 43        public static GenericConfirmationNotificationData CreateUnBlockUserData(string userName, Action confirmationActi
 44            new (
 45                $"Are you sure you want to unblock {userName}?",
 46                "Once you unblock someone, you will see their avatar in-world and you will both be able to see each othe
 47                "CANCEL",
 48                "UNBLOCK",
 49                null,
 50                confirmationAction);
 51    }
 52
 53    public class DataStore_Notifications
 54    {
 655        public readonly BaseVariable<string> DefaultErrorNotification = new ();
 656        public readonly BaseVariable<GenericConfirmationNotificationData> GenericConfirmation = new ();
 57    }
 58}

Methods/Properties

DataStore_Notifications()