< Summary

Class:HUDDesktopFactory
Assembly:HUDDesktop
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Desktop/Scripts/MainScripts/DCL/Controllers/HUD/HUDDesktopFactory.cs
Covered lines:0
Uncovered lines:14
Coverable lines:14
Total lines:72
Line coverage:0% (0 of 14)
Covered branches:0
Total branches:0
Covered methods:0
Total methods:1
Method coverage:0% (0 of 1)

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
CreateHUD()0%72800%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Desktop/Scripts/MainScripts/DCL/Controllers/HUD/HUDDesktopFactory.cs

#LineLine coverage
 1using Cysharp.Threading.Tasks;
 2using DCL;
 3using DCL.Browser;
 4using DCL.Controllers.HUD;
 5using DCL.MyAccount;
 6using DCL.SettingsCommon;
 7using DCLServices.CopyPaste.Analytics;
 8using DCLServices.PlacesAPIService;
 9using MainScripts.DCL.Controllers.HUD.Profile;
 10using MainScripts.DCL.Controllers.HUD.SettingsPanelHUDDesktop.Scripts;
 11using SocialFeaturesAnalytics;
 12using System.Threading;
 13using UnityEngine;
 14
 15public class HUDDesktopFactory : HUDFactory
 16{
 17    private const string VIEW_NAME = "_ProfileHUD";
 18
 19    public override async UniTask<IHUD> CreateHUD(HUDElementID hudElementId, CancellationToken cancellationToken = defau
 20    {
 021        IHUD hudElement = null;
 22
 23        switch (hudElementId)
 24        {
 25            case HUDElementID.NONE:
 26                break;
 27            case HUDElementID.SETTINGS_PANEL:
 028                hudElement = new SettingsPanelHUDControllerDesktop();
 029                break;
 30            case HUDElementID.PROFILE_HUD:
 031                ProfileHUDViewDesktop_V2 view = Object.Instantiate(Resources.Load<ProfileHUDViewDesktop_V2>("ProfileHUDD
 032                view.name = VIEW_NAME;
 33
 034                var userProfileWebInterfaceBridge = new UserProfileWebInterfaceBridge();
 035                var webInterfaceBrowserBridge = new WebInterfaceBrowserBridge();
 36
 037                hudElement = new ProfileHUDControllerDesktop(
 38                    view,
 39                    userProfileWebInterfaceBridge,
 40                    new SocialAnalytics(
 41                        Environment.i.platform.serviceProviders.analytics,
 42                        userProfileWebInterfaceBridge),
 43                    DataStore.i,
 44                    new MyAccountCardController(
 45                        view.MyAccountCardView,
 46                        DataStore.i,
 47                        userProfileWebInterfaceBridge,
 48                        Settings.i,
 49                        webInterfaceBrowserBridge),
 50                    webInterfaceBrowserBridge);
 051                break;
 52            case HUDElementID.MINIMAP:
 053                hudElement = new MinimapHUDControllerDesktop(
 54                    MinimapMetadataController.i,
 55                    new WebInterfaceHomeLocationController(),
 56                    Environment.i,
 57                    Environment.i.serviceLocator.Get<IPlacesAPIService>(),
 58                    new PlacesAnalytics(),
 59                    Clipboard.Create(),
 60                    Environment.i.serviceLocator.Get<ICopyPasteAnalyticsService>(),
 61                    DataStore.i.contentModeration,
 62                    Environment.i.world.state);
 063                break;
 64
 65            default:
 066                hudElement = await base.CreateHUD(hudElementId, cancellationToken);
 67                break;
 68        }
 69
 070        return hudElement;
 071    }
 72}

Methods/Properties

CreateHUD()