< Summary

Class:DCL.ABConverter.AssetPath
Assembly:ABConverter
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/ABConverter/AssetPath.cs
Covered lines:0
Uncovered lines:15
Coverable lines:15
Total lines:43
Line coverage:0% (0 of 15)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
AssetPath(...)0%2100%
AssetPath(...)0%2100%
ToString()0%2100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/ABConverter/AssetPath.cs

#LineLine coverage
 1using DCL.Helpers;
 2using System.Collections;
 3using System.IO;
 4using UnityEditor.Experimental.TerrainAPI;
 5using UnityEngine.Networking;
 6using MappingPair = DCL.ContentServerUtils.MappingPair;
 7
 8namespace DCL.ABConverter
 9{
 10    public class AssetPath
 11    {
 12        public readonly string basePath;
 13        public readonly MappingPair pair;
 014        public string hash => pair.hash;
 015        public string file => pair.file;
 16
 017        public AssetPath(string basePath, string hash, string file)
 18        {
 019            this.basePath = basePath;
 020            this.pair = new MappingPair { hash = hash, file = file };
 021        }
 22
 023        public AssetPath(string basePath, MappingPair pair)
 24        {
 025            this.basePath = basePath;
 026            this.pair = pair;
 027        }
 28
 29        public string finalPath
 30        {
 31            get
 32            {
 033                char dash = Path.DirectorySeparatorChar;
 034                string fileExt = Path.GetExtension(pair.file);
 035                return basePath + pair.hash + dash + pair.hash + fileExt;
 36            }
 37        }
 38
 039        public string finalMetaPath => Path.ChangeExtension(finalPath, "meta");
 40
 041        public override string ToString() { return $"hash:{hash} - file:{file}"; }
 42    }
 43}