< Summary

Class:LandWithAccess
Assembly:LandWIthAccess
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Helpers/DeployedScenesFetcher/LandWithAccess/LandWithAccess.cs
Covered lines:6
Uncovered lines:6
Coverable lines:12
Total lines:27
Line coverage:50% (6 of 12)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
LandWithAccess(...)0%660100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Helpers/DeployedScenesFetcher/LandWithAccess/LandWithAccess.cs

#LineLine coverage
 1using System.Collections.Generic;
 2using System.Linq;
 3using DCL.Builder;
 4using UnityEngine;
 5
 6public class LandWithAccess
 7{
 08    public string id => rawData.id;
 09    public LandType type => rawData.type;
 010    public LandRole role => rawData.role;
 011    public int size { get; }
 012    public string name => rawData.name;
 013    public string owner => rawData.owner;
 14
 15    public List<Scene> scenes;
 16    public Vector2Int[] parcels;
 17    public Vector2Int baseCoords;
 18    public Land rawData;
 19
 920    public LandWithAccess(Land land)
 21    {
 922        rawData = land;
 1323        parcels = land.parcels.Select(parcel => new Vector2Int(parcel.x, parcel.y)).ToArray();
 924        baseCoords = land.type == LandType.PARCEL ? new Vector2Int(land.x, land.y) : parcels[0];
 925        size = land.type == LandType.PARCEL ? 1 : land.size;
 926    }
 27}