< Summary

Class:MapInfoHandler
Assembly:ExploreV2
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/ExploreV2/Scripts/Common/Handlers/MapInfoHandler.cs
Covered lines:11
Uncovered lines:3
Coverable lines:14
Total lines:31
Line coverage:78.5% (11 of 14)
Covered branches:0
Total branches:0
Covered methods:11
Total methods:12
Method coverage:91.6% (11 of 12)

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
SetMinimapSceneInfo(...)0%110100%
ContainCoords(...)0%6200%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/ExploreV2/Scripts/Common/Handlers/MapInfoHandler.cs

#LineLine coverage
 1using DCL.Helpers;
 2using System;
 3using System.Linq;
 4using UnityEngine;
 5using MainScripts.DCL.Controllers.HotScenes;
 6
 7public class MapInfoHandler : IMapDataView
 8{
 519    public Vector2Int baseCoord { private set; get; }
 5110    public string name { private set; get; }
 5111    public string creator { private set; get; }
 5112    public string description { private set; get; }
 13
 5114    public Vector2Int[] parcels { private set; get; }
 15
 16    public void SetMinimapSceneInfo(IHotScenesController.PlaceInfo sceneInfo)
 17    {
 5118        baseCoord = Utils.ConvertStringToVector(sceneInfo.base_position);
 5119        name = sceneInfo.title;
 5120        creator = sceneInfo.owner;
 5121        description = sceneInfo.description;
 5122        parcels = sceneInfo.Positions;
 5123    }
 24
 25    public bool ContainCoords(Vector2Int coords)
 26    {
 027        if (parcels == null)
 028            return false;
 029        return parcels.Contains(coords);
 30    }
 31}