< Summary

Class:WelcomeNotification
Assembly:WelcomeNotification
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/HUD/NotificationHUD/WelcomeNotification/WelcomeNotification.cs
Covered lines:0
Uncovered lines:6
Coverable lines:6
Total lines:27
Line coverage:0% (0 of 6)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
Get()0%20400%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/HUD/NotificationHUD/WelcomeNotification/WelcomeNotification.cs

#LineLine coverage
 1using DCL.NotificationModel;
 2using UnityEngine;
 3
 4public static class WelcomeNotification
 5{
 6    const int NOTIFICATION_DURATION = 5;
 7
 8    public static Model Get()
 9    {
 010        string notificationText = $"Welcome, {UserProfile.GetOwnUserProfile().userName}!";
 011        Vector2Int currentCoords = CommonScriptableObjects.playerCoords.Get();
 012        string parcelName = MinimapMetadata.GetMetadata().GetSceneInfo(currentCoords.x, currentCoords.y)?.name;
 13
 014        if (!string.IsNullOrEmpty(parcelName))
 15        {
 016            notificationText += $" You are in {parcelName} {currentCoords.x}, {currentCoords.y}";
 17        }
 18
 019        return new Model()
 20        {
 21            message = notificationText,
 22            scene = "",
 23            type = Type.GENERIC_WITHOUT_BUTTON,
 24            timer = NOTIFICATION_DURATION
 25        };
 26    }
 27}

Methods/Properties

Get()