< Summary

Class:DCL.SettingsCommon.SettingsControllers.SpecificControllers.BaseResolutionControlController
Assembly:SettingsControllers
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/Settings/SettingsControllers/SpecificControllers/BaseResolutionControlController.cs
Covered lines:5
Uncovered lines:4
Coverable lines:9
Total lines:30
Line coverage:55.5% (5 of 9)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
GetStoredValue()0%110100%
UpdateSetting(...)0%64050%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/Settings/SettingsControllers/SpecificControllers/BaseResolutionControlController.cs

#LineLine coverage
 1using DCL.Interface;
 2using DCL.SettingsCommon.SettingsControllers.BaseControllers;
 3using UnityEngine;
 4
 5namespace DCL.SettingsCommon.SettingsControllers.SpecificControllers
 6{
 7    [CreateAssetMenu(menuName = "Settings/Controllers/Controls/Base Resolution", fileName = "BaseResolutionControlContro
 8    public class BaseResolutionControlController : SpinBoxSettingsControlController
 9    {
 210        public override object GetStoredValue() { return (int)currentQualitySetting.baseResolution; }
 11
 12        public override void UpdateSetting(object newValue)
 13        {
 214            currentQualitySetting.baseResolution = (QualitySettings.BaseResolution)newValue;
 15
 216            switch (currentQualitySetting.baseResolution)
 17            {
 18                case QualitySettings.BaseResolution.BaseRes_720:
 019                    WebInterface.SetBaseResolution(820);
 020                    break;
 21                case QualitySettings.BaseResolution.BaseRes_1080:
 222                    WebInterface.SetBaseResolution(1080);
 223                    break;
 24                case QualitySettings.BaseResolution.BaseRes_Unlimited:
 025                    WebInterface.SetBaseResolution(9999);
 26                    break;
 27            }
 028        }
 29    }
 30}