< Summary

Class:DCL.ECSComponents.PBUiDropdown_Defaults
Assembly:DCL.ECSComponents.Defaults
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/Defaults/PBUiDropdown_Defaults.cs
Covered lines:0
Uncovered lines:6
Coverable lines:6
Total lines:25
Line coverage:0% (0 of 6)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
GetColor(...)0%6200%
GetFont(...)0%6200%
GetFontSize(...)0%12300%
IsInteractable(...)0%2100%
GetSelectedIndex(...)0%12300%
GetTextAlign(...)0%6200%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/Defaults/PBUiDropdown_Defaults.cs

#LineLine coverage
 1using Decentraland.Common;
 2
 3namespace DCL.ECSComponents
 4{
 5    public static class PBUiDropdown_Defaults
 6    {
 7        public static Color4 GetColor(this PBUiDropdown self) =>
 08            self.Color ?? Color_Defaults.color4Black;
 9
 10        public static Font GetFont(this PBUiDropdown self) =>
 011            self.HasFont ? self.Font : Font.FSansSerif;
 12
 13        public static float GetFontSize(this PBUiDropdown self) =>
 014            self.HasFontSize ? self.FontSize : 10;
 15
 16        public static bool IsInteractable(this PBUiDropdown self) =>
 017            !self.Disabled;
 18
 19        public static int GetSelectedIndex(this PBUiDropdown self) =>
 020            self.SelectedIndex <= -1 ? (self.AcceptEmpty ? -1 : 0) : self.SelectedIndex;
 21
 22        public static TextAlignMode GetTextAlign(this PBUiDropdown self) =>
 023            self.HasTextAlign ? self.TextAlign : TextAlignMode.TamMiddleCenter;
 24    }
 25}