< Summary

Class:Bank
Assembly:Test
File(s):D:/--UnityProject/VR/subjects1_for_analysis/UnityCityView-master/UnityCityView-master/Assets/Scripts/Bank.cs
Covered lines:24
Uncovered lines:2
Coverable lines:26
Total lines:45
Line coverage:92.3% (24 of 26)
Covered branches:0
Total branches:0
Covered methods:6
Total methods:6
Method coverage:100% (6 of 6)

Coverage History

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
Start()0%000100%
Update()0%000100%
showlabel()0%000100%
GetLabel()0%00080%
GetBuilding10Name()0%000100%
GetBuilding101Name()0%000100%

File(s)

D:/--UnityProject/VR/subjects1_for_analysis/UnityCityView-master/UnityCityView-master/Assets/Scripts/Bank.cs

#LineLine coverage
 1using System.Collections;
 2using System.Collections.Generic;
 3using UnityEngine;
 4using TMPro;
 5
 6public class Bank : MonoBehaviour
 7{
 8    // Start is called before the first frame update
 9  GameObject label;
 10    void Start()
 211    {
 212        GameObject player = GameObject.Find("Player");
 213    label = player.transform.GetChild(1).gameObject;
 214    }
 15
 16    // Update is called once per frame
 17    void Update()
 498018    {
 19
 498020    }
 21
 222  public void showlabel(){
 223    label.GetComponent<TextMeshPro>().text = GetLabel().Substring(0, 20);
 224  }
 25
 226  string GetLabel(){
 227    string ret = "Bank:";
 328    if(gameObject.name == "Building10"){
 129      ret = ret + GetBuilding10Name();
 330    }else if(gameObject.name == "Building101"){
 131      ret = ret + GetBuilding101Name();
 132    }else{
 033      ret = ret + "Unknown Bank";
 034    }
 235    return ret;
 236  }
 37
 138  string GetBuilding10Name(){
 139    return "Eevee Global Bank";
 140  }
 41
 142  string GetBuilding101Name(){
 143    return "Lucario's Bank Co.";
 144  }
 45}