< Summary

Class:BuilderPanelDataFetcher
Assembly:BuilderProjectsPanel
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLPlugins/BuilderInWorld/HUD/ProjectsPanelHUD/Scripts/BuilderPanelDataFetcher.cs
Covered lines:5
Uncovered lines:4
Coverable lines:9
Total lines:24
Line coverage:55.5% (5 of 9)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
FetchProjectData(...)0%110100%

File(s)

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

#LineLine coverage
 1using System.Collections;
 2using System.Collections.Generic;
 3using DCL.Builder;
 4using DCL.Helpers;
 5using UnityEngine;
 6
 7public static class BuilderPanelDataFetcher
 8{
 9    public static Promise<ProjectData[]> FetchProjectData(IBuilderAPIController apiController)
 10    {
 111        var promise = new Promise<ProjectData[]>();
 112        var manifestPromise = apiController.GetAllManifests();
 113        manifestPromise.Then(projectList =>
 14        {
 015            promise.Resolve(projectList.ToArray());
 016        });
 117        manifestPromise.Catch(error =>
 18        {
 019            promise.Reject(error);
 020        });
 21
 122        return promise;
 23    }
 24}