< Summary

Class:DCL.MyAccount.MyAccountSectionHUDController
Assembly:MyAccountHUD
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/HUD/MyAccountHUD/MyAccountSectionHUDController.cs
Covered lines:13
Uncovered lines:0
Coverable lines:13
Total lines:39
Line coverage:100% (13 of 13)
Covered branches:0
Total branches:0
Covered methods:4
Total methods:4
Method coverage:100% (4 of 4)

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
MyAccountSectionHUDController(...)0%110100%
Dispose()0%110100%
ShowAccountSettingsUpdatedToast()0%110100%
ConfigureMyAccountSectionInFullscreenMenuChanged(...)0%110100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/HUD/MyAccountHUD/MyAccountSectionHUDController.cs

#LineLine coverage
 1using UnityEngine;
 2
 3namespace DCL.MyAccount
 4{
 5    public class MyAccountSectionHUDController
 6    {
 7        private const string NEW_TOS_AND_EMAIL_SUBSCRIPTION_FF = "new_terms_of_service_and_email_subscription";
 8
 9        private readonly IMyAccountSectionHUDComponentView view;
 10        private readonly DataStore dataStore;
 11
 4112        public MyAccountSectionHUDController(
 13            IMyAccountSectionHUDComponentView view,
 14            DataStore dataStore)
 15        {
 4116            this.view = view;
 4117            this.dataStore = dataStore;
 18
 4119            dataStore.exploreV2.configureMyAccountSectionInFullscreenMenu.OnChange += ConfigureMyAccountSectionInFullscr
 4120            ConfigureMyAccountSectionInFullscreenMenuChanged(dataStore.exploreV2.configureMyAccountSectionInFullscreenMe
 21
 4122            dataStore.myAccount.isInitialized.Set(true);
 4123        }
 24
 25        public void Dispose()
 26        {
 4127            dataStore.exploreV2.configureMyAccountSectionInFullscreenMenu.OnChange -= ConfigureMyAccountSectionInFullscr
 4128        }
 29
 30        public void ShowAccountSettingsUpdatedToast() =>
 2831            view.ShowAccountSettingsUpdatedToast();
 32
 33        private void ConfigureMyAccountSectionInFullscreenMenuChanged(Transform currentParentTransform, Transform _)
 34        {
 4135            view.SetAsFullScreenMenuMode(currentParentTransform);
 4136            view.SetSectionsMenuActive(dataStore.featureFlags.flags.Get().IsFeatureEnabled(NEW_TOS_AND_EMAIL_SUBSCRIPTIO
 4137        }
 38    }
 39}