< Summary

Class:DCL.SettingsCommon.SettingsControllers.SpecificControllers.RefectionResolutionControlController
Assembly:SettingsControllers
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/Settings/SettingsControllers/SpecificControllers/RefectionResolutionControlController.cs
Covered lines:6
Uncovered lines:8
Coverable lines:14
Total lines:39
Line coverage:42.8% (6 of 14)
Covered branches:0
Total branches:0

Metrics

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

File(s)

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

#LineLine coverage
 1using DCL.SettingsCommon.SettingsControllers.BaseControllers;
 2using System.Collections;
 3using System.Collections.Generic;
 4using UnityEngine;
 5
 6namespace DCL.SettingsCommon.SettingsControllers.SpecificControllers
 7{
 8    [CreateAssetMenu(menuName = "Settings/Controllers/Controls/Reflection Resolution", fileName = "ReflectionResolutionC
 9    public class RefectionResolutionControlController : SpinBoxSettingsControlController
 10    {
 11
 112        public override object GetStoredValue() { return (int)currentQualitySetting.reflectionResolution; }
 13
 14        public override void UpdateSetting(object newValue)
 15        {
 116            int value = (int)newValue;
 117            currentQualitySetting.reflectionResolution = (QualitySettings.ReflectionResolution)value;
 18
 119            switch (currentQualitySetting.reflectionResolution)
 20            {
 21                case QualitySettings.ReflectionResolution.Res_256:
 022                    DataStore.i.skyboxConfig.reflectionResolution.Set(256);
 023                    break;
 24                case QualitySettings.ReflectionResolution.Res_512:
 125                    DataStore.i.skyboxConfig.reflectionResolution.Set(512);
 126                    break;
 27                case QualitySettings.ReflectionResolution.Res_1024:
 028                    DataStore.i.skyboxConfig.reflectionResolution.Set(1024);
 029                    break;
 30                case QualitySettings.ReflectionResolution.Res_2048:
 031                    DataStore.i.skyboxConfig.reflectionResolution.Set(2048);
 032                    break;
 33                default:
 034                    DataStore.i.skyboxConfig.reflectionResolution.Set(256);
 35                    break;
 36            }
 037        }
 38    }
 39}