< 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:26
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 UnityEngine;
 4
 5public class LandWithAccess
 6{
 07    public string id => rawData.id;
 08    public LandType type => rawData.type;
 09    public LandRole role => rawData.role;
 010    public int size { get; }
 011    public string name => rawData.name;
 012    public string owner => rawData.owner;
 13
 14    public List<DeployedScene> scenes;
 15    public Vector2Int[] parcels;
 16    public Vector2Int baseCoords;
 17    public Land rawData;
 18
 919    public LandWithAccess(Land land)
 20    {
 921        rawData = land;
 1322        parcels = land.parcels.Select(parcel => new Vector2Int(parcel.x, parcel.y)).ToArray();
 923        baseCoords = land.type == LandType.PARCEL ? new Vector2Int(land.x, land.y) : parcels[0];
 924        size = land.type == LandType.PARCEL ? 1 : land.size;
 925    }
 26}