< Summary

Class:SectionBase
Assembly:BuilderProjectsPanel
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/HUD/BuilderProjectsPanel/Scripts/SectionController/SectionBase.cs
Covered lines:11
Uncovered lines:4
Coverable lines:15
Total lines:40
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/Scripts/MainScripts/DCL/Controllers/HUD/BuilderProjectsPanel/Scripts/SectionController/SectionBase.cs

#LineLine coverage
 1using System;
 2using UnityEngine;
 3
 4internal abstract class SectionBase : IDisposable
 5{
 06    public bool isVisible { get; private set; } = false;
 07    public virtual ISectionSearchHandler searchHandler { get; protected set; } = null;
 328    public virtual SearchBarConfig searchBarConfig { get; protected set; } = new SearchBarConfig()
 9    {
 10        showFilterContributor = false,
 11        showFilterOperator = true,
 12        showFilterOwner = true,
 13        showResultLabel = true
 14    };
 015    public bool isLoading { get; private set; } = false;
 16
 17    public abstract void SetViewContainer(Transform viewContainer);
 18    public abstract void Dispose();
 19    protected abstract void OnShow();
 20    protected abstract void OnHide();
 621    protected virtual void OnFetchingStateChange(bool isLoading) { }
 22
 23    public void SetVisible(bool visible)
 24    {
 825        if (isVisible == visible)
 026            return;
 27
 828        isVisible = visible;
 829        if (visible)
 630            OnShow();
 31        else
 232            OnHide();
 233    }
 34
 35    public void SetFetchingDataState(bool isLoading)
 36    {
 637        this.isLoading = isLoading;
 638        OnFetchingStateChange(isLoading);
 639    }
 40}