< Summary

Class:DCL.Builder.SectionBase
Assembly:BuilderProjectsPanel
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLPlugins/BuilderInWorld/HUD/ProjectsPanelHUD/Scripts/SectionController/SectionBase.cs
Covered lines:11
Uncovered lines:4
Coverable lines:15
Total lines:43
Line coverage:73.3% (11 of 15)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
SectionBase()0%110100%
OnFetchingStateChange(...)0%110100%
SetVisible(...)0%3.033085.71%
SetFetchingDataState(...)0%110100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLPlugins/BuilderInWorld/HUD/ProjectsPanelHUD/Scripts/SectionController/SectionBase.cs

#LineLine coverage
 1using System;
 2using UnityEngine;
 3
 4namespace DCL.Builder
 5{
 6    internal abstract class SectionBase : IDisposable
 7    {
 08        public bool isVisible { get; private set; } = false;
 09        public virtual ISectionSearchHandler searchHandler { get; protected set; } = null;
 2710        public virtual SearchBarConfig searchBarConfig { get; protected set; } = new SearchBarConfig()
 11        {
 12            showFilterContributor = false,
 13            showFilterOperator = true,
 14            showFilterOwner = true,
 15            showResultLabel = true
 16        };
 017        public bool isLoading { get; private set; } = false;
 18
 19        public abstract void SetViewContainer(Transform viewContainer);
 20        public abstract void Dispose();
 21        protected abstract void OnShow();
 22        protected abstract void OnHide();
 523        protected virtual void OnFetchingStateChange(bool isLoading) { }
 24
 25        public void SetVisible(bool visible)
 26        {
 727            if (isVisible == visible)
 028                return;
 29
 730            isVisible = visible;
 731            if (visible)
 532                OnShow();
 33            else
 234                OnHide();
 235        }
 36
 37        public void SetFetchingDataState(bool isLoading)
 38        {
 539            this.isLoading = isLoading;
 540            OnFetchingStateChange(isLoading);
 541        }
 42    }
 43}