< Summary

Class:DCL.ECSComponents.PBUiInput_Defaults
Assembly:DCL.ECSComponents.Defaults
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/Defaults/PBUiInput_Defaults.cs
Covered lines:7
Uncovered lines:0
Coverable lines:7
Total lines:27
Line coverage:100% (7 of 7)
Covered branches:0
Total branches:0
Covered methods:7
Total methods:7
Method coverage:100% (7 of 7)

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
PBUiInput_Defaults()0%110100%
GetColor(...)0%220100%
GetPlaceholderColor(...)0%220100%
IsInteractable(...)0%110100%
GetTextAlign(...)0%220100%
GetFont(...)0%220100%
GetFontSize(...)0%330100%

File(s)

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

#LineLine coverage
 1using Decentraland.Common;
 2
 3namespace DCL.ECSComponents
 4{
 5    public static class PBUiInput_Defaults
 6    {
 17        private static readonly Color4 PLACEHOLDER_COLOR = new () { R = 0.3f, G = 0.3f, B = 0.3f, A = 1.0f };
 8
 9        public static Color4 GetColor(this PBUiInput self) =>
 410            self.Color ?? Color_Defaults.color4Black;
 11
 12        public static Color4 GetPlaceholderColor(this PBUiInput self) =>
 413            self.PlaceholderColor ?? PLACEHOLDER_COLOR;
 14
 15        public static bool IsInteractable(this PBUiInput self) =>
 416            !self.Disabled;
 17
 18        public static TextAlignMode GetTextAlign(this PBUiInput self) =>
 419            self.HasTextAlign ? self.TextAlign : TextAlignMode.TamMiddleCenter;
 20
 21        public static Font GetFont(this PBUiInput self) =>
 422            self.HasFont ? self.Font : Font.FSansSerif;
 23
 24        public static float GetFontSize(this PBUiInput self) =>
 425            self.HasFontSize ? self.FontSize : 10;
 26    }
 27}