< Summary

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

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
GetSectionController(...)0%56700%

File(s)

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

#LineLine coverage
 1using System;
 2using DCL.Builder;
 3
 4namespace DCL.Builder
 5{
 6    internal interface ISectionFactory
 7    {
 8        SectionBase GetSectionController(SectionId id);
 9    }
 10
 11    internal class SectionFactory : ISectionFactory
 12    {
 13        SectionBase ISectionFactory.GetSectionController(SectionId id)
 14        {
 015            SectionBase result = null;
 16            switch (id)
 17            {
 18                case SectionId.SCENES:
 019                    result = new SectionScenesController();
 020                    break;
 21                case SectionId.PROJECTS:
 022                    result = new SectionProjectController();
 023                    break;
 24                case SectionId.LAND:
 025                    result = new SectionLandController();
 026                    break;
 27                case SectionId.SETTINGS_PROJECT_GENERAL:
 028                    result = new SectionSceneGeneralSettingsController();
 029                    break;
 30                case SectionId.SETTINGS_PROJECT_CONTRIBUTORS:
 031                    result = new SectionSceneContributorsSettingsController();
 032                    break;
 33                case SectionId.SETTINGS_PROJECT_ADMIN:
 034                    result = new SectionSceneAdminsSettingsController();
 35                    break;
 36            }
 37
 038            return result;
 39        }
 40    }
 41}