< Summary

Class:TextureModel
Assembly:DCL.Components.TextureModel
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Components/Textures/Data/TextureModel.cs
Covered lines:10
Uncovered lines:3
Coverable lines:13
Total lines:44
Line coverage:76.9% (10 of 13)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
TextureModel()0%2100%
Equals(...)0%330100%
Equals(...)0%4.374071.43%
GetHashCode()0%330100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Components/Textures/Data/TextureModel.cs

#LineLine coverage
 1using System.Collections;
 2using System.Collections.Generic;
 3using DCL.Helpers;
 4using UnityEngine;
 5
 6[System.Serializable]
 7public class TextureModel
 8{
 9    public enum BabylonWrapMode
 10    {
 11        CLAMP,
 12        WRAP,
 13        MIRROR
 14    }
 15
 16    public string src;
 17    public BabylonWrapMode wrap = BabylonWrapMode.CLAMP;
 018    public FilterMode samplingMode = FilterMode.Bilinear;
 19
 20    protected bool Equals(TextureModel other)
 21    {
 9722        return src == other.src && wrap == other.wrap && samplingMode == other.samplingMode;
 23    }
 24    public override bool Equals(object obj)
 25    {
 24626        if (ReferenceEquals(null, obj))
 027            return false;
 24628        if (ReferenceEquals(this, obj))
 14929            return true;
 9730        if (obj.GetType() != this.GetType())
 031            return false;
 9732        return Equals((TextureModel) obj);
 33    }
 34    public override int GetHashCode()
 35    {
 36        unchecked
 37        {
 62438            int hashCode = (src != null ? src.GetHashCode() : 0);
 62439            hashCode = (hashCode * 397) ^ (int) wrap;
 62440            hashCode = (hashCode * 397) ^ (int) samplingMode;
 62441            return hashCode;
 42        }
 43    }
 44}